home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / news / readers / rn / rn.4.4.patch.2 < prev    next >
Encoding:
Text File  |  1991-12-06  |  88.3 KB  |  3,629 lines

  1. This is rn 4.4 patch number 2.
  2.  
  3. Please note that rn 4.4 on lib.tmc.edu, gazette.bcm.tmc.edu, bcm.tmc.edu
  4. and tmc.edu have all been updated to rn 4.4.2 and have this patch installed.
  5.  
  6. Description:
  7.     1. Configure contained an error in producing the CONTROL-A character.
  8.     It now does this correctly.
  9.     2. AIX is now supported.
  10.     3. The clientlib object is now placed in the rn directory instead
  11.     of the nntp source tree. 
  12.     4. Problems with searching for the occurance of characters that 
  13.     are also used as part of regular expressions have been corrected.
  14.     5. Some documentation errors have been corrected.
  15.     6. The uudecode routines are now more error free.
  16.  
  17. Install this patch using Larry Wall's patch program.
  18.  
  19.  
  20.  
  21.  
  22. Index: Configure
  23. Prereq: 4.4.1.1
  24. *** Configure    Fri Dec  6 23:49:03 1991
  25. --- ../rn4.4.2/Configure    Sun Dec  1 12:10:51 1991
  26. ***************
  27. *** 15,21
  28.   # If these # comments don't work, trim them.  Don't worry about the other
  29.   # shell scripts, Configure will trim # comments from them for you.
  30.   #
  31. ! # $Id: Configure,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  32.   #
  33.   # $Log: Configure,v $
  34.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  35.  
  36. --- 15,21 -----
  37.   # If these # comments don't work, trim them.  Don't worry about the other
  38.   # shell scripts, Configure will trim # comments from them for you.
  39.   #
  40. ! # $Id: Configure,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  41.   #
  42.   # $Log: Configure,v $
  43.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  44. ***************
  45. *** 18,23
  46.   # $Id: Configure,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  47.   #
  48.   # $Log: Configure,v $
  49.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  50.   # various fixed
  51.   #
  52.  
  53. --- 18,26 -----
  54.   # $Id: Configure,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  55.   #
  56.   # $Log: Configure,v $
  57. + # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  58. + # Patchlevel 2 changes
  59. + #
  60.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  61.   # various fixed
  62.   #
  63. ***************
  64. *** 28,34
  65.   
  66.   # Yes, you may rip this off to use in other distribution packages.
  67.   
  68. ! CTRL=`echo a | tr a '\011'`
  69.   
  70.   bopt=''
  71.   n=''
  72.  
  73. --- 31,37 -----
  74.   
  75.   # Yes, you may rip this off to use in other distribution packages.
  76.   
  77. ! CTRLA=`echo a | tr a '\001'`
  78.   
  79.   bopt=''
  80.   n=''
  81. ***************
  82. *** 63,69
  83.   nametype=''
  84.   cc=''
  85.   iandd=''
  86. - include=''
  87.   rrninclude=''
  88.   termlib=''
  89.   jobslib=''
  90.  
  91. --- 66,71 -----
  92.   nametype=''
  93.   cc=''
  94.   iandd=''
  95.   rrninclude=''
  96.   termlib=''
  97.   jobslib=''
  98. ***************
  99. *** 260,266
  100.   if test -f ./config.sh; then
  101.       echo " "
  102.       dflt=y
  103. !     rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
  104.       echo $n "$rp $c"
  105.       . myread
  106.       case "$ans" in
  107.  
  108. --- 262,268 -----
  109.   if test -f ./config.sh; then
  110.       echo " "
  111.       dflt=y
  112. !     rp="I see a config.sh file.  Do you want to use it to set the defaults? [$dflt]"
  113.       echo $n "$rp $c"
  114.       . myread
  115.       case "$ans" in
  116. ***************
  117. *** 315,321
  118.       fi
  119.   fi
  120.   
  121. ! if test -d /usr/bsd43 ; then
  122.       echo " "
  123.       echo "It appears that you might be running on a MIPS RISC/os box."
  124.       echo $n "Should I pass the -B option to nm [y]? $c"
  125.  
  126. --- 317,323 -----
  127.       fi
  128.   fi
  129.   
  130. ! if test -d /usr/bsd43 -o -d /usr/bsd ; then
  131.       echo " "
  132.       echo "It appears that you might be running on a RISC/os box."
  133.       echo $n "Should I pass the -B option to nm [y]? $c"
  134. ***************
  135. *** 317,323
  136.   
  137.   if test -d /usr/bsd43 ; then
  138.       echo " "
  139. !     echo "It appears that you might be running on a MIPS RISC/os box."
  140.       echo $n "Should I pass the -B option to nm [y]? $c"
  141.       . myread
  142.       case $ans in
  143.  
  144. --- 319,325 -----
  145.   
  146.   if test -d /usr/bsd43 -o -d /usr/bsd ; then
  147.       echo " "
  148. !     echo "It appears that you might be running on a RISC/os box."
  149.       echo $n "Should I pass the -B option to nm [y]? $c"
  150.       . myread
  151.       case $ans in
  152. ***************
  153. *** 325,330
  154.       *)     bopt='-B' ;;
  155.       esac
  156.   fi
  157.   
  158.   echo " "
  159.   echo $n "Extracting names from $libc for later perusal...$c"
  160.  
  161. --- 327,338 -----
  162.       *)     bopt='-B' ;;
  163.       esac
  164.   fi
  165. + if test -f /bin/smit ; then
  166. +     echo " "
  167. +     echo "It appears that you might be running on an IBM RS/6000 box."
  168. +     echo "We'll be using 'nm -B' to get the symbol lists."
  169. +     bopt='-B'
  170. + fi
  171.   
  172.   echo " "
  173.   echo $n "Extracting names from $libc for later perusal...$c"
  174. ***************
  175. *** 590,596
  176.   rm sgi.c
  177.   if sgi; then
  178.       echo "Silicon Graphics must have built this..."
  179. !     include=-I/usr/include/bsd
  180.   fi
  181.   
  182.   : check for XENIX
  183.  
  184. --- 598,606 -----
  185.   rm sgi.c
  186.   if sgi; then
  187.       echo "Silicon Graphics must have built this..."
  188. !     if test -f /usr/lib/libsun.a ; then
  189. !          socketlib=-lsun
  190. !      fi
  191.   fi
  192.   
  193.   : check for XENIX
  194. ***************
  195. *** 641,646
  196.   if next; then
  197.       echo "My, you really ARE on a NeXT."
  198.       addcflags='-bsd'
  199.   fi
  200.   
  201.   if bsd; then
  202.  
  203. --- 651,657 -----
  204.   if next; then
  205.       echo "My, you really ARE on a NeXT."
  206.       addcflags='-bsd'
  207. +     test=test
  208.   fi
  209.   
  210.   if bsd; then
  211. ***************
  212. *** 746,752
  213.   : find out where common programs are
  214.   echo " "
  215.   echo "Locating common programs..."
  216. ! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /usr/etc /usr/5bin"
  217.   cat <<EOSC >loc
  218.   $startsh
  219.   thing=\$1
  220.  
  221. --- 757,763 -----
  222.   : find out where common programs are
  223.   echo " "
  224.   echo "Locating common programs..."
  225. ! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /usr/etc /usr/5bin /usr/bsd /usr/bsd43"
  226.   cat <<EOSC >loc
  227.   $startsh
  228.   thing=\$1
  229. ***************
  230. *** 1511,1518
  231.   ans=`loc libcurses.a x /usr/lib /usr/local/lib /lib`
  232.   case "$ans" in
  233.   /*)
  234. !     ar t $ans >grimble
  235. !     if $contains tputs grimble >/dev/null 2>&1; then
  236.       termlib='-lcurses'
  237.       havetlib=define
  238.       $echo "Terminfo library found."
  239.  
  240. --- 1522,1528 -----
  241.   ans=`loc libcurses.a x /usr/lib /usr/local/lib /lib`
  242.   case "$ans" in
  243.   /*)
  244. !     if test -f /bin/smit; then
  245.       termlib='-lcurses'
  246.       havetlib=define
  247.       $echo "Using -lcurses and assuming terminfo, since this looks like AIX."
  248. ***************
  249. *** 1515,1521
  250.       if $contains tputs grimble >/dev/null 2>&1; then
  251.       termlib='-lcurses'
  252.       havetlib=define
  253. !     $echo "Terminfo library found."
  254.       else
  255.       ans=x
  256.       fi
  257.  
  258. --- 1525,1531 -----
  259.       if test -f /bin/smit; then
  260.       termlib='-lcurses'
  261.       havetlib=define
  262. !     $echo "Using -lcurses and assuming terminfo, since this looks like AIX."
  263.       else
  264.       ar t $ans >grimble
  265.       if $contains tputs grimble >/dev/null 2>&1; then
  266. ***************
  267. *** 1517,1523
  268.       havetlib=define
  269.       $echo "Terminfo library found."
  270.       else
  271. !     ans=x
  272.       fi
  273.       ;;
  274.   esac
  275.  
  276. --- 1527,1540 -----
  277.       havetlib=define
  278.       $echo "Using -lcurses and assuming terminfo, since this looks like AIX."
  279.       else
  280. !     ar t $ans >grimble
  281. !     if $contains tputs grimble >/dev/null 2>&1; then
  282. !         termlib='-lcurses'
  283. !         havetlib=define
  284. !         $echo "Terminfo library found."
  285. !     else
  286. !         ans=x
  287. !     fi
  288.       fi
  289.       ;;
  290.   esac
  291. ***************
  292. *** 1633,1640
  293.   
  294.   : see if the system has sigblock
  295.   if $contains '^sigblock$' libc.list >/dev/null 2>&1 ; then
  296. !     $echo "sigblock() found."
  297. !     sigblock=define
  298.   else
  299.       sigblock=undef
  300.   fi
  301.  
  302. --- 1650,1662 -----
  303.   
  304.   : see if the system has sigblock
  305.   if $contains '^sigblock$' libc.list >/dev/null 2>&1 ; then
  306. !      if sgi; then
  307. !          $echo "sigblock() found -- but should not use it on Silicon Graphics"
  308. !          sigblock=undef
  309. !     else
  310. !     $echo "sigblock() found."
  311. !         sigblock=define
  312. !     fi
  313.   else
  314.       sigblock=undef
  315.   fi
  316. ***************
  317. *** 1697,1708
  318.       $echo "YP may be running -- will use getpwent(), just in case."
  319.       getpwent='define'
  320.   else
  321. ! : see if there is a getpw
  322. ! if $contains '^getpw$' libc.list >/dev/null 2>&1 ; then
  323. !     $echo "getpw() found."
  324. !     getpwent='undef'
  325. ! else
  326. !     $echo "No getpw() found--will use getpwent() instead."
  327.       getpwent='define'
  328.   fi
  329.   fi
  330.  
  331. --- 1719,1727 -----
  332.       $echo "YP may be running -- will use getpwent(), just in case."
  333.       getpwent='define'
  334.   else
  335. ! : see if there is a getpwent
  336. ! if $contains '^getpwent$' libc.list >/dev/null 2>&1 ; then
  337. !     $echo "getpwent() found."
  338.       getpwent='define'
  339.   else
  340.       $echo "No getpwent() found--will use getpw() instead."
  341. ***************
  342. *** 1704,1709
  343.   else
  344.       $echo "No getpw() found--will use getpwent() instead."
  345.       getpwent='define'
  346.   fi
  347.   fi
  348.   
  349.  
  350. --- 1723,1731 -----
  351.   if $contains '^getpwent$' libc.list >/dev/null 2>&1 ; then
  352.       $echo "getpwent() found."
  353.       getpwent='define'
  354. + else
  355. +     $echo "No getpwent() found--will use getpw() instead."
  356. +     getpwent='undef'
  357.   fi
  358.   fi
  359.   
  360. ***************
  361. *** 1710,1715
  362.   : default
  363.   sigret=int
  364.   : determine type of signal function
  365.   if stardent; then
  366.       sigret=void
  367.   else
  368.  
  369. --- 1732,1743 -----
  370.   : default
  371.   sigret=int
  372.   : determine type of signal function
  373. + if sgi; then
  374. +     sigret=void
  375. + else
  376. + if next; then
  377. +     sigret=int
  378. + else
  379.   if stardent; then
  380.       sigret=void
  381.   else
  382. ***************
  383. *** 1713,1720
  384.   if stardent; then
  385.       sigret=void
  386.   else
  387. ! if [ -f /usr/include/signal.h ]
  388. ! then
  389.       $cpp /usr/include/signal.h >sigtest
  390.   else
  391.   if [ -f /usr/include/sys/signal.h ]
  392.  
  393. --- 1741,1747 -----
  394.   if stardent; then
  395.       sigret=void
  396.   else
  397. ! if test -f /usr/include/signal.h ; then
  398.       $cpp /usr/include/signal.h >sigtest
  399.   else
  400.   if test -f /usr/include/sys/signal.h ; then
  401. ***************
  402. *** 1717,1724
  403.   then
  404.       $cpp /usr/include/signal.h >sigtest
  405.   else
  406. ! if [ -f /usr/include/sys/signal.h ]
  407. ! then
  408.       $cpp /usr/include/sys/signal.h >sigtest
  409.   fi
  410.   fi
  411.  
  412. --- 1744,1750 -----
  413.   if test -f /usr/include/signal.h ; then
  414.       $cpp /usr/include/signal.h >sigtest
  415.   else
  416. ! if test -f /usr/include/sys/signal.h ; then
  417.       $cpp /usr/include/sys/signal.h >sigtest
  418.   fi
  419.   fi
  420. ***************
  421. *** 1727,1732
  422.       sigret=void
  423.   fi
  424.   fi
  425.   $echo "signal() returns $sigret on this system."
  426.   : see how we will look up site name
  427.   douname=undef
  428.  
  429. --- 1753,1760 -----
  430.       sigret=void
  431.   fi
  432.   fi
  433. + fi
  434. + fi
  435.   $echo "signal() returns $sigret on this system."
  436.   : see how we will look up site name
  437.   douname=undef
  438. ***************
  439. *** 1919,1925
  440.   isrrn=''
  441.   while $test -z "$isrrn" ; do
  442.       $echo " "
  443. !     $echo $n "Do you want to build the NNTP versions of rn (rrn)? [$dflt] $c"
  444.       . myread
  445.       case "$ans" in
  446.       '') ans="$dflt";;
  447.  
  448. --- 1947,1953 -----
  449.   isrrn=''
  450.   while $test -z "$isrrn" ; do
  451.       $echo " "
  452. !     $echo $n "Do you want to build the NNTP version of rn (rrn)? [$dflt] $c"
  453.       . myread
  454.       case "$ans" in
  455.       '') ans="$dflt";;
  456. ***************
  457. *** 1989,2008
  458.           fi
  459.       done
  460.       NNTPSRC="$ans"
  461. - cat > server.h <<EOF_SERVE
  462. - #ifdef SERVER
  463. - extern    char    *getserverbyfile ANSI((char *));
  464. - extern    int    server_init ANSI((char *));
  465. - extern    void    put_server ANSI((char *));
  466. - extern    int    get_server ANSI((char *,int));
  467. - extern    void    close_server ANSI((void));
  468. - #include "$NNTPSRC/common/nntp.h"
  469. - EXT     char ser_line[NNTP_STRLEN];
  470. - #endif
  471. - EOF_SERVE
  472.       esac
  473.   
  474.   done
  475.  
  476. --- 2017,2022 -----
  477.           fi
  478.       done
  479.       NNTPSRC="$ans"
  480.       esac
  481.   
  482.   done
  483. ***************
  484. *** 2648,2654
  485.   serverfile='$serverfile'
  486.   NNTPSRC='$NNTPSRC'
  487.   CONFIG=true
  488. - CTRLA='$CTRLA'
  489.   EOT
  490.   CONFIG=true
  491.   $rm -f libc.list .distlist kit*isdone 
  492.  
  493. --- 2662,2667 -----
  494.   serverfile='$serverfile'
  495.   NNTPSRC='$NNTPSRC'
  496.   CONFIG=true
  497.   EOT
  498.   CONFIG=true
  499.   $rm -f libc.list .distlist kit*isdone 
  500. Index: Makefile.SH
  501. Prereq: 4.4.1.1
  502. *** Makefile.SH    Fri Dec  6 23:49:49 1991
  503. --- ../rn4.4.2/Makefile.SH    Sun Dec  1 12:06:24 1991
  504. ***************
  505. *** 2,9
  506.       '') . ./config.sh ;;
  507.   esac
  508.   echo "Extracting Makefile (with variable substitutions)"
  509. ! cat >Makefile <<!GROK!THIS!
  510. ! # $Id: Makefile.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  511.   #
  512.   # This software is Copyright 1991 by Stan Barber. 
  513.   #
  514.  
  515. --- 2,9 -----
  516.       '') . ./config.sh ;;
  517.   esac
  518.   echo "Extracting Makefile (with variable substitutions)"
  519. ! $cat >Makefile <<!GROK!THIS!
  520. ! # $Id: Makefile.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  521.   #
  522.   # This software is Copyright 1991 by Stan Barber. 
  523.   #
  524. ***************
  525. *** 18,23
  526.   # is at the user's own risk. 
  527.   #
  528.   # $Log: Makefile.SH,v $
  529.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  530.   # Changed some install directives
  531.   #
  532.  
  533. --- 18,26 -----
  534.   # is at the user's own risk. 
  535.   #
  536.   # $Log: Makefile.SH,v $
  537. + # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  538. + # Changed clientlib to be built in the rn tree instead of the nntp tree.
  539. + #
  540.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  541.   # Changed some install directives
  542.   #
  543. ***************
  544. *** 42,48
  545.   libs = $ndirlib $termlib $jobslib $socketlib -lm
  546.   mlibs = $jobslib
  547.   !GROK!THIS!
  548. ! cat >>Makefile <<'!NO!SUBS!'
  549.   #NNTPnntp=getactive
  550.   public = rn newsetup newsgroups Pnews Rnmail
  551.   private = norm.saver mbox.saver makedir    filexp Pnews.header $(nntp)
  552.  
  553. --- 45,51 -----
  554.   libs = $ndirlib $termlib $jobslib $socketlib -lm
  555.   mlibs = $jobslib
  556.   !GROK!THIS!
  557. ! $cat >>Makefile <<'!NO!SUBS!'
  558.   #NNTPnntp=getactive
  559.   public = rn newsetup newsgroups Pnews Rnmail
  560.   private = norm.saver mbox.saver makedir    filexp Pnews.header $(nntp)
  561. ***************
  562. *** 54,60
  563.   h2 = common.h final.h head.h help.h init.h intrp.h kfile.h last.h 
  564.   h3 = ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  565.   h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  566. - #NNTPh5 = server.h
  567.   
  568.   h = $(h1) $(h2) $(h3) $(h4) $(h5)
  569.   
  570.  
  571. --- 57,62 -----
  572.   h2 = common.h final.h head.h help.h init.h intrp.h kfile.h last.h 
  573.   h3 = ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  574.   h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  575.   
  576.   h = $(h1) $(h2) $(h3) $(h4)
  577.   
  578. ***************
  579. *** 56,62
  580.   h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  581.   #NNTPh5 = server.h
  582.   
  583. ! h = $(h1) $(h2) $(h3) $(h4) $(h5)
  584.   
  585.   c1 = addng.c art.c artio.c artsrch.c autosub.c backpage.c bits.c cheat.c
  586.   c2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c
  587.  
  588. --- 58,64 -----
  589.   h3 = ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  590.   h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  591.   
  592. ! h = $(h1) $(h2) $(h3) $(h4)
  593.   
  594.   c1 = addng.c art.c artio.c artsrch.c autosub.c backpage.c bits.c cheat.c
  595.   c2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c
  596. ***************
  597. *** 70,76
  598.   obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  599.   obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o respond.o rn.o
  600.   obj4 = search.o sw.o term.o util.o uudecode.o
  601. ! #NNTPobj5 =  $(NNTPDIR)/common/clientlib.o
  602.   
  603.   obj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5)
  604.   
  605.  
  606. --- 72,78 -----
  607.   obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  608.   obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o respond.o rn.o
  609.   obj4 = search.o sw.o term.o util.o uudecode.o
  610. ! #NNTPobj5 =  clientlib.o
  611.   
  612.   obj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5)
  613.   
  614. ***************
  615. *** 88,93
  616.   # grrr
  617.   SHELL = /bin/sh
  618.   
  619.   .c.o:
  620.       $(CC) -c $(CFLAGS) $*.c
  621.   
  622.  
  623. --- 90,96 -----
  624.   # grrr
  625.   SHELL = /bin/sh
  626.   
  627.   .c.o:
  628.       $(CC) -c $(CFLAGS) $*.c
  629.   
  630. ***************
  631. *** 98,105
  632.       $(CC) $(LDFLAGS) $(obj) $(libs) -o rn
  633.   
  634.   
  635. ! #NNTPgetactive: getactive.o $(NNTPDIR)/common/clientlib.o
  636. ! #NNTP    $(CC) $(LDFLAGS) getactive.o $(NNTPDIR)/common/clientlib.o -o getactive $(libs)
  637.   
  638.   # Eek! This is gross.
  639.   $(NNTPDIR)/common/clientlib.o:
  640.  
  641. --- 101,108 -----
  642.       $(CC) $(LDFLAGS) $(obj) $(libs) -o rn
  643.   
  644.   
  645. ! #NNTPgetactive: getactive.o clientlib.o
  646. ! #NNTP    $(CC) $(LDFLAGS) getactive.o clientlib.o -o getactive $(libs)
  647.   
  648.   #NNTPclientlib.o:
  649.   #NNTP    $(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
  650. ***************
  651. *** 101,110
  652.   #NNTPgetactive: getactive.o $(NNTPDIR)/common/clientlib.o
  653.   #NNTP    $(CC) $(LDFLAGS) getactive.o $(NNTPDIR)/common/clientlib.o -o getactive $(libs)
  654.   
  655. ! # Eek! This is gross.
  656. ! $(NNTPDIR)/common/clientlib.o:
  657. !     $(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
  658. !     mv clientlib.o $(NNTPDIR)/common/clientlib.o
  659.   
  660.   # if a .h file depends on another .h file...
  661.   $(h):
  662.  
  663. --- 104,111 -----
  664.   #NNTPgetactive: getactive.o clientlib.o
  665.   #NNTP    $(CC) $(LDFLAGS) getactive.o clientlib.o -o getactive $(libs)
  666.   
  667. ! #NNTPclientlib.o:
  668. ! #NNTP    $(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
  669.   
  670.   # if a .h file depends on another .h file...
  671.   $(h):
  672. ***************
  673. *** 117,124
  674.   #NNTP    - ln -s rn $(rnbin)/rrn
  675.       - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  676.       - if test `pwd` != $(rnbin); then cd $(rnbin); chmod 755 $(public); strip rn ; fi
  677. - #    - if test ! -x makedir; then chmod 755 makedir; fi
  678. -     - chmod 755 makedir
  679.       - ./makedir `./filexp $(rnlib)`
  680.       - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  681.   #NNTP    - if test `pwd` != `./filexp $(rnlib)`; then strip `./filexp $(rnlib)`/getactive ; fi
  682.  
  683. --- 118,123 -----
  684.   #NNTP    - ln -s rn $(rnbin)/rrn
  685.       - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  686.       - if test `pwd` != $(rnbin); then cd $(rnbin); chmod 755 $(public); strip rn ; fi
  687.       - ./makedir `./filexp $(rnlib)`
  688.       - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  689.   #NNTP    - if test `pwd` != `./filexp $(rnlib)`; then strip `./filexp $(rnlib)`/getactive ; fi
  690. ***************
  691. *** 136,142
  692.   
  693.   realclean:
  694.       rm -f rn *.o core $(addedbyconf) 
  695. ! #NNTP    rm -f $(NNTPDIR)/common/clientlib.o getactive
  696.   
  697.   # The following lint has practically everything turned on.  Unfortunately,
  698.   # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  699.  
  700. --- 135,141 -----
  701.   
  702.   realclean:
  703.       rm -f rn *.o core $(addedbyconf) 
  704. ! #NNTP    rm -f clientlib.o getactive
  705.   
  706.   # The following lint has practically everything turned on.  Unfortunately,
  707.   # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  708. ***************
  709. *** 148,154
  710.   lint_rn:
  711.       lint $(lintflags) $(defs) $(c) > rn.fuzz
  712.   
  713. ! depend:
  714.       ./makedepend
  715.   
  716.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  717.  
  718. --- 147,153 -----
  719.   lint_rn:
  720.       lint $(lintflags) $(defs) $(c) > rn.fuzz
  721.   
  722. ! depend: config.h Makefile
  723.       ./makedepend
  724.   
  725.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  726. ***************
  727. *** 152,157
  728.       ./makedepend
  729.   
  730.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  731.   $(obj):
  732.       @ echo "You haven't done a "'"make depend" yet!'; exit 1
  733.   !NO!SUBS!
  734.  
  735. --- 151,158 -----
  736.       ./makedepend
  737.   
  738.   # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  739. + config.h: config.h.SH config.sh ; sh config.h.SH
  740. + Makefile: Makefile.SH config.sh ; sh Makefile.SH
  741.   $(obj):
  742.       @ echo "You haven't done a "'"make depend" yet!'; exit 1
  743.   !NO!SUBS!
  744. Index: NEW
  745. *** NEW    Fri Dec  6 23:49:55 1991
  746. --- ../rn4.4.2/NEW    Sun Dec  1 12:13:55 1991
  747. ***************
  748. *** 1,3
  749.               NEW FEATURES OF RN 4.4 vs RN 4.3
  750.   
  751.   New or modified commands
  752.  
  753. --- 1,22 -----
  754. +             NEW FEATURES OF RN 4.4.2 vs RN 4.4
  755. + New % interpolation
  756. +     %E        the last directory to which extracted files were
  757. +             placed.
  758. + Configure improvements
  759. +     Configure knows about AIX and can build a version of rn that works
  760. +     correctly on AIX.
  761. +     Configure is generally smarter about getting symbols out of various
  762. +     type of archive files.
  763. +     The server.h include file is now generated outside of Configure via
  764. +     server.h.SH shell script.
  765. + General improvements
  766. +     rn no longer incorrectly interprets a . in a header line as a meta-
  767. +     character.
  768. +     The memory management in the newrc array managment code is now much
  769. +     better.
  770.               NEW FEATURES OF RN 4.4 vs RN 4.3
  771.   
  772.   New or modified commands
  773. Index: Pnews.SH
  774. Prereq: 4.4
  775. *** Pnews.SH    Fri Dec  6 23:49:31 1991
  776. --- ../rn4.4.2/Pnews.SH    Sun Dec  1 12:07:40 1991
  777. ***************
  778. *** 4,10
  779.   echo "Extracting Pnews (with variable substitutions)"
  780.   $spitshell >Pnews <<!GROK!THIS!
  781.   $startsh
  782. ! # $Id: Pnews.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  783.   #
  784.   # $Log: Pnews.SH,v $
  785.   # Revision 4.4  1991/09/09  20:18:23  sob
  786.  
  787. --- 4,10 -----
  788.   echo "Extracting Pnews (with variable substitutions)"
  789.   $spitshell >Pnews <<!GROK!THIS!
  790.   $startsh
  791. ! # $Id: Pnews.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  792.   #
  793.   # $Log: Pnews.SH,v $
  794.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  795. ***************
  796. *** 7,12
  797.   # $Id: Pnews.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  798.   #
  799.   # $Log: Pnews.SH,v $
  800.   # Revision 4.4  1991/09/09  20:18:23  sob
  801.   # release 4.4
  802.   #
  803.  
  804. --- 7,15 -----
  805.   # $Id: Pnews.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  806.   #
  807.   # $Log: Pnews.SH,v $
  808. + # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  809. + # Patchlevel 2
  810. + #
  811.   # Revision 4.4  1991/09/09  20:18:23  sob
  812.   # release 4.4
  813.   #
  814. ***************
  815. *** 638,645
  816.   
  817.   follow=""
  818.   
  819. ! case $# in
  820. ! 0)
  821.       title=h
  822.       while $test "$title" = h ; do
  823.       $echo ""
  824.  
  825. --- 641,653 -----
  826.   
  827.   follow=""
  828.   
  829. ! # LCP 16-Oct-91 Subject line is required.  Make it a little more
  830. ! # difficult to omit.  Added "while : ; do", ... "done", and "if"
  831. ! # at end of while loop.
  832. ! while :
  833. ! do
  834. !   case $# in
  835. !   0)
  836.       title=h
  837.       while $test "$title" = h ; do
  838.       $echo ""
  839. ***************
  840. *** 658,664
  841.       esac
  842.       done
  843.       ;;
  844. ! *)
  845.       title="$*"
  846.       ;;
  847.   esac
  848.  
  849. --- 666,672 -----
  850.       esac
  851.       done
  852.       ;;
  853. !   *)
  854.       title="$*"
  855.       # LCP 16-Oct-91 Added "set" and "shift".  Must insure $# is 0
  856.       # in case the title is all white space and we make another
  857. ***************
  858. *** 660,665
  859.       ;;
  860.   *)
  861.       title="$*"
  862.       ;;
  863.   esac
  864.   
  865.  
  866. --- 668,678 -----
  867.       ;;
  868.     *)
  869.       title="$*"
  870. +     # LCP 16-Oct-91 Added "set" and "shift".  Must insure $# is 0
  871. +     # in case the title is all white space and we make another
  872. +     # pass thru this loop.
  873. +     set X
  874. +     shift
  875.       ;;
  876.     esac
  877.     if expr "X$title" : "^X[    ]*$" > /dev/null 2>&1
  878. ***************
  879. *** 661,667
  880.   *)
  881.       title="$*"
  882.       ;;
  883. ! esac
  884.   
  885.   # now build a file with a header for them to edit
  886.   
  887.  
  888. --- 674,692 -----
  889.       set X
  890.       shift
  891.       ;;
  892. !   esac
  893. !   if expr "X$title" : "^X[    ]*$" > /dev/null 2>&1
  894. !   then
  895. !     $cat <<'EOH'
  896. ! Articles without a "Subject:" line will not be accepted by the News
  897. ! system.  Please give a Title/Subject line for your article.
  898. ! EOH
  899. !   else
  900. !      break
  901. !   fi
  902. ! done
  903.   
  904.   # now build a file with a header for them to edit
  905.   
  906. Index: addng.c
  907. Prereq: 4.4
  908. *** addng.c    Fri Dec  6 23:49:52 1991
  909. --- ../rn4.4.2/addng.c    Sun Dec  1 12:08:44 1991
  910. ***************
  911. *** 1,4
  912. ! /* $Id: addng.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  913.    *
  914.    * $Log: addng.c,v $
  915.    * Revision 4.4  1991/09/09  20:18:23  sob
  916.  
  917. --- 1,4 -----
  918. ! /* $Id: addng.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  919.    *
  920.    * $Log: addng.c,v $
  921.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  922. ***************
  923. *** 1,6
  924.   /* $Id: addng.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  925.    *
  926.    * $Log: addng.c,v $
  927.    * Revision 4.4  1991/09/09  20:18:23  sob
  928.    * release 4.4
  929.    *
  930.  
  931. --- 1,9 -----
  932.   /* $Id: addng.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  933.    *
  934.    * $Log: addng.c,v $
  935. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  936. +  * Patchlevel 2 changes
  937. +  *
  938.    * Revision 4.4  1991/09/09  20:18:23  sob
  939.    * release 4.4
  940.    *
  941. ***************
  942. *** 52,57
  943.   {
  944.       char *tmpname;
  945.       register char *s, *status;
  946.       long birthof();
  947.   
  948.       tmpname = savestr(filexp(RNEWNAME));
  949.  
  950. --- 55,61 -----
  951.   {
  952.       char *tmpname;
  953.       register char *s, *status;
  954. +     register NG_NUM ngnum;
  955.       long birthof();
  956.   
  957.       tmpname = savestr(filexp(RNEWNAME));
  958. ***************
  959. *** 77,82
  960.               /* since = groups are refiling to another group, just
  961.              ignore their existence */
  962.           continue;
  963.           if (find_ng(buf) == nextrcline &&
  964.               (checkinlist ?
  965.               (inlist(buf)) :
  966.  
  967. --- 81,87 -----
  968.               /* since = groups are refiling to another group, just
  969.              ignore their existence */
  970.           continue;
  971. + #ifdef OLD_ADD_METHOD
  972.           if (find_ng(buf) == nextrcline &&
  973.               (checkinlist ?
  974.               (inlist(buf)) :
  975. ***************
  976. *** 82,87
  977.               (inlist(buf)) :
  978.               (birthof(buf,(ART_NUM)atol(s)) > lasttime)
  979.               )
  980.           ) {
  981.                       /* if not in .newsrc and younger */
  982.                       /* than the last time we checked */
  983.  
  984. --- 87,99 -----
  985.               (inlist(buf)) :
  986.               (birthof(buf,(ART_NUM)atol(s)) > lasttime)
  987.               )
  988. + #else
  989. +         if (checkinlist ?
  990. +         (inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline
  991. +                  || toread[ngnum] == TR_UNSUB))
  992. +           : (find_ng(buf) == nextrcline
  993. +          && birthof(buf,(ART_NUM)atol(s)) > lasttime)
  994. + #endif
  995.           ) {
  996.                       /* if not in .newsrc and younger */
  997.                       /* than the last time we checked */
  998. Index: art.c
  999. Prereq: 4.4
  1000. *** art.c    Fri Dec  6 23:49:24 1991
  1001. --- ../rn4.4.2/art.c    Sun Dec  1 12:08:47 1991
  1002. ***************
  1003. *** 1,4
  1004. ! /* $Id: art.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1005.    *
  1006.    *
  1007.    * 
  1008.  
  1009. --- 1,4 -----
  1010. ! /* $Id: art.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1011.    *
  1012.    *
  1013.    * 
  1014. ***************
  1015. *** 243,248
  1016.           htype[SUBJ_LINE].ht_flags & HT_MAGIC) {
  1017.                   /* is this the subject? */
  1018.           int length;
  1019.   
  1020.           length = strlen(art_buf)-1;
  1021.           artline++;
  1022.  
  1023. --- 243,249 -----
  1024.           htype[SUBJ_LINE].ht_flags & HT_MAGIC) {
  1025.                   /* is this the subject? */
  1026.           int length;
  1027. +         char sp;
  1028.   
  1029.           length = strlen(art_buf)-1;
  1030.           artline++;
  1031. ***************
  1032. *** 262,269
  1033.               vwtary(artline,vrdary(artline-1)+COLS);
  1034.               artline++;
  1035.           }
  1036. -         s = art_buf + 8;
  1037. -         *s++ = '\0';    /* make into 2 strings */
  1038.   #ifdef CLEAREOL
  1039.           maybe_eol();    
  1040.   #endif /* CLEAREOL */
  1041.  
  1042. --- 263,268 -----
  1043.               vwtary(artline,vrdary(artline-1)+COLS);
  1044.               artline++;
  1045.           }
  1046.   #ifdef CLEAREOL
  1047.           maybe_eol();    
  1048.   #endif /* CLEAREOL */
  1049. ***************
  1050. *** 267,274
  1051.   #ifdef CLEAREOL
  1052.           maybe_eol();    
  1053.   #endif /* CLEAREOL */
  1054. !         fputs(art_buf,stdout) FLUSH;
  1055. !                 /* print up through : */
  1056.           if (!UG)
  1057.               putchar(' ');
  1058.           underprint(s);    /* print subject underlined */
  1059.  
  1060. --- 266,290 -----
  1061.   #ifdef CLEAREOL
  1062.           maybe_eol();    
  1063.   #endif /* CLEAREOL */
  1064. !         /* Find the point where the subject text starts. */
  1065. !         s = art_buf;
  1066. !         if (!isspace(*s)) {
  1067. !             /* This is the first subject line, not a continuation
  1068. !                line.  Skip past the "Subject:" */
  1069. !             s += 8;
  1070. !         }
  1071. !         /* Skip past any whitespace. */
  1072. !         while (isspace(*s)) ++s;
  1073. !         /* Split the string in two at the whitespace. */
  1074. !         sp = *(s-1);
  1075. !         *(s-1) = '\0';
  1076. !         fputs(art_buf, stdout) FLUSH;
  1077. !         /* On an UGly terminal, the start-underline magic cookie
  1078. !            takes up space, so we steal a space from the subject
  1079. !            line.  This is not quite right for tabs; oh well. */
  1080.           if (!UG)
  1081.               putchar(sp);
  1082.   
  1083. ***************
  1084. *** 270,276
  1085.           fputs(art_buf,stdout) FLUSH;
  1086.                   /* print up through : */
  1087.           if (!UG)
  1088. !             putchar(' ');
  1089.           underprint(s);    /* print subject underlined */
  1090.           putchar('\n') FLUSH;    /* and finish the line */
  1091.           }
  1092.  
  1093. --- 286,293 -----
  1094.              takes up space, so we steal a space from the subject
  1095.              line.  This is not quite right for tabs; oh well. */
  1096.           if (!UG)
  1097. !             putchar(sp);
  1098.           underprint(s);    /* print subject underlined */
  1099.           putchar('\n') FLUSH;    /* and finish the line */
  1100.           }
  1101. Index: artsrch.c
  1102. Prereq: 4.4
  1103. *** artsrch.c    Fri Dec  6 23:49:45 1991
  1104. --- ../rn4.4.2/artsrch.c    Sun Dec  1 12:08:58 1991
  1105. ***************
  1106. *** 1,4
  1107. ! /* $Id: artsrch.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1108.    *
  1109.    * $Log: artsrch.c,v $
  1110.    * Revision 4.4  1991/09/09  20:18:23  sob
  1111.  
  1112. --- 1,4 -----
  1113. ! /* $Id: artsrch.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1114.    *
  1115.    * $Log: artsrch.c,v $
  1116.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1117. ***************
  1118. *** 1,6
  1119.   /* $Id: artsrch.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1120.    *
  1121.    * $Log: artsrch.c,v $
  1122.    * Revision 4.4  1991/09/09  20:18:23  sob
  1123.    * release 4.4
  1124.    *
  1125.  
  1126. --- 1,9 -----
  1127.   /* $Id: artsrch.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1128.    *
  1129.    * $Log: artsrch.c,v $
  1130. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1131. +  * Patchlevel 2 changes
  1132. +  *
  1133.    * Revision 4.4  1991/09/09  20:18:23  sob
  1134.    * release 4.4
  1135.    *
  1136. ***************
  1137. *** 133,139
  1138.       pattern = patbuf+1;
  1139.       strcpy(pattern,": *");
  1140.       h = pattern + strlen(pattern);
  1141. !     interp(h,patbufsiz - (h-patbuf),"%s");    /* fetch current subject */
  1142.       if (cmdchr == 'K') {
  1143.           saltaway = TRUE;
  1144.           cmdchr = 'k';
  1145.  
  1146. --- 136,142 -----
  1147.       pattern = patbuf+1;
  1148.       strcpy(pattern,": *");
  1149.       h = pattern + strlen(pattern);
  1150. !     interp(h,patbufsiz - (h-patbuf),"%\\s");  /* fetch current subject */
  1151.       if (cmdchr == 'K') {
  1152.           saltaway = TRUE;
  1153.           cmdchr = 'k';
  1154. ***************
  1155. *** 160,171
  1156.       }
  1157.       else if (!srchahead)
  1158.           srchahead = -1;
  1159. !     h[24] = '\0';        /* compensate for notesfiles */
  1160. !     while (*h) {
  1161. !         if (index("/\\[.^*$'\"",*h) != Nullch)
  1162. !         *h++ = '.';
  1163. !         else
  1164. !         h++;
  1165.       }
  1166.   #ifdef DEBUGGING
  1167.       if (debug) {
  1168.  
  1169. --- 163,174 -----
  1170.       }
  1171.       else if (!srchahead)
  1172.           srchahead = -1;
  1173. !     {            /* compensate for notesfiles */
  1174. !         register int i;
  1175. !         for (i = 24; *h && i--; h++)
  1176. !         if (*h == '\\')
  1177. !             h++;
  1178. !         *h = '\0';
  1179.       }
  1180.   #ifdef DEBUGGING
  1181.       if (debug) {
  1182. Index: cheat.c
  1183. Prereq: 4.4
  1184. *** cheat.c    Fri Dec  6 23:49:56 1991
  1185. --- ../rn4.4.2/cheat.c    Sun Dec  1 12:09:09 1991
  1186. ***************
  1187. *** 1,4
  1188. ! /* $Id: cheat.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1189.    *
  1190.    * $Log: cheat.c,v $
  1191.    * Revision 4.4  1991/09/09  20:18:23  sob
  1192.  
  1193. --- 1,4 -----
  1194. ! /* $Id: cheat.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1195.    *
  1196.    * $Log: cheat.c,v $
  1197.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1198. ***************
  1199. *** 1,6
  1200.   /* $Id: cheat.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1201.    *
  1202.    * $Log: cheat.c,v $
  1203.    * Revision 4.4  1991/09/09  20:18:23  sob
  1204.    * release 4.4
  1205.    *
  1206.  
  1207. --- 1,9 -----
  1208.   /* $Id: cheat.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1209.    *
  1210.    * $Log: cheat.c,v $
  1211. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1212. +  * Patchlevel 2 changes
  1213. +  *
  1214.    * Revision 4.4  1991/09/09  20:18:23  sob
  1215.    * release 4.4
  1216.    *
  1217. ***************
  1218. *** 66,78
  1219.       pattern = buf+1;
  1220.       strcpy(pattern,": *");
  1221.       h = pattern + strlen(pattern);
  1222. !     interp(h,(sizeof buf) - (h-buf),"%s");
  1223. !     h[24] = '\0';        /* compensate for notesfiles */
  1224. !     while (*h) {
  1225. !         if (index("\\[.^*$'\"",*h) != Nullch)
  1226. !         *h++ = '.';
  1227. !         else
  1228. !         h++;
  1229.       }
  1230.   #ifdef DEBUGGING
  1231.       if (debug & DEB_SEARCH_AHEAD) {
  1232.  
  1233. --- 69,81 -----
  1234.       pattern = buf+1;
  1235.       strcpy(pattern,": *");
  1236.       h = pattern + strlen(pattern);
  1237. !     interp(h,(sizeof buf) - (h-buf),"%\\s");
  1238. !     {            /* compensate for notesfiles */
  1239. !         register int i;
  1240. !         for (i = 24; *h && i--; h++)
  1241. !         if (*h == '\\')
  1242. !             h++;
  1243. !         *h = '\0';
  1244.       }
  1245.   #ifdef DEBUGGING
  1246.       if (debug & DEB_SEARCH_AHEAD) {
  1247. Index: common.h
  1248. Prereq: 4.4
  1249. *** common.h    Fri Dec  6 23:49:10 1991
  1250. --- ../rn4.4.2/common.h    Sun Dec  1 12:10:08 1991
  1251. ***************
  1252. *** 1,4
  1253. ! /* $Id: common.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1254.    * 
  1255.    * $Log: common.h,v $
  1256.    * Revision 4.4  1991/09/09  20:18:23  sob
  1257.  
  1258. --- 1,4 -----
  1259. ! /* $Id: common.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1260.    * 
  1261.    * $Log: common.h,v $
  1262.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1263. ***************
  1264. *** 1,6
  1265.   /* $Id: common.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1266.    * 
  1267.    * $Log: common.h,v $
  1268.    * Revision 4.4  1991/09/09  20:18:23  sob
  1269.    * release 4.4
  1270.    *
  1271.  
  1272. --- 1,9 -----
  1273.   /* $Id: common.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1274.    * 
  1275.    * $Log: common.h,v $
  1276. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1277. +  * Patchlevel 2 changes
  1278. +  *
  1279.    * Revision 4.4  1991/09/09  20:18:23  sob
  1280.    * release 4.4
  1281.    *
  1282. ***************
  1283. *** 135,140
  1284.    *    %C    Current newsgroup, dot form
  1285.    *    %d    %P/%c
  1286.    *    %D    Old Distribution: line
  1287.    *    %f    Old From: line or Reply-To: line
  1288.    *    %F    Newsgroups to followup to from Newsgroups: and Followup-To:
  1289.    *    %h    Name of header file to pass to mail or news poster
  1290.  
  1291. --- 138,145 -----
  1292.    *    %C    Current newsgroup, dot form
  1293.    *    %d    %P/%c
  1294.    *    %D    Old Distribution: line
  1295. +  *    %e    Extract program
  1296. +  *    %E    Extract destination directory
  1297.    *    %f    Old From: line or Reply-To: line
  1298.    *    %F    Newsgroups to followup to from Newsgroups: and Followup-To:
  1299.    *    %h    Name of header file to pass to mail or news poster
  1300. ***************
  1301. *** 163,168
  1302.    *    %z    Size of current article in bytes.
  1303.    *    %~    Home directory
  1304.    *    %.    Directory containing . files
  1305.    *    %$    current process number
  1306.    *    %{name} Environment variable "name".  %{name-default} form allowed.
  1307.    *    %[name]    Header line beginning with "Name: ", without "Name: " 
  1308.  
  1309. --- 168,174 -----
  1310.    *    %z    Size of current article in bytes.
  1311.    *    %~    Home directory
  1312.    *    %.    Directory containing . files
  1313. +  *    %#    count of articles saved in current command (from 1 to n)
  1314.    *    %$    current process number
  1315.    *    %{name} Environment variable "name".  %{name-default} form allowed.
  1316.    *    %[name]    Header line beginning with "Name: ", without "Name: " 
  1317. Index: config.h.SH
  1318. Prereq: 4.4
  1319. *** config.h.SH    Fri Dec  6 23:49:47 1991
  1320. --- ../rn4.4.2/config.h.SH    Sun Dec  1 12:08:04 1991
  1321. ***************
  1322. *** 1,30
  1323.   : create config.h file
  1324.   echo "Extracting config.h (with variable substitutions)"
  1325.   . ./config.sh
  1326. ! case "$strchr" in
  1327. ! define)    strchr='';;
  1328. ! *)    strchr='/*';;
  1329. ! esac
  1330. ! case "$memcpy" in
  1331. ! define)    memcpy='';;
  1332. ! *)    memcpy='/*';;
  1333. ! esac
  1334. ! case "$novoid" in
  1335. ! define)    novoid='';;
  1336. ! *)    novoid='/*';;
  1337. ! esac
  1338. ! case "$novfork" in
  1339. ! define)    novfork='';;
  1340. ! *)    novfork='/*';;
  1341. ! esac
  1342. ! case "$phostname" in
  1343. ! define)    phostname='';;
  1344. ! *)    phostname='/*';;
  1345. ! esac
  1346. ! case "$isrrn" in
  1347. ! define)    isrrn2='';;
  1348. ! *)    isrrn2='/*';;
  1349. ! esac
  1350.   case "$hostfile" in
  1351.   '')    usehostfile='/*';;
  1352.   *)    usehostfile='';;
  1353.  
  1354. --- 1,7 -----
  1355.   : create config.h file
  1356.   echo "Extracting config.h (with variable substitutions)"
  1357.   . ./config.sh
  1358.   case "$hostfile" in
  1359.   '')    usehostfile='undef';;
  1360.   *)    usehostfile='define';;
  1361. ***************
  1362. *** 26,33
  1363.   *)    isrrn2='/*';;
  1364.   esac
  1365.   case "$hostfile" in
  1366. ! '')    usehostfile='/*';;
  1367. ! *)    usehostfile='';;
  1368.   esac
  1369.   $cat <<EOT >config.h
  1370.   /* config.h
  1371.  
  1372. --- 3,10 -----
  1373.   . ./config.sh
  1374.   
  1375.   case "$hostfile" in
  1376. ! '')    usehostfile='undef';;
  1377. ! *)    usehostfile='define';;
  1378.   esac
  1379.   
  1380.   $sed 's,^#undef,/*#undef,' >config.h <<EOT
  1381. ***************
  1382. *** 29,35
  1383.   '')    usehostfile='/*';;
  1384.   *)    usehostfile='';;
  1385.   esac
  1386. ! $cat <<EOT >config.h
  1387.   /* config.h
  1388.    * This file was produced by running the config.h.SH script, which
  1389.    * gets its values from config.sh, which is generally produced by
  1390.  
  1391. --- 6,13 -----
  1392.   '')    usehostfile='undef';;
  1393.   *)    usehostfile='define';;
  1394.   esac
  1395. ! $sed 's,^#undef,/*#undef,' >config.h <<EOT
  1396.   /* config.h
  1397.    * This file was produced by running the config.h.SH script, which
  1398.    * gets its values from config.sh, which is generally produced by
  1399. ***************
  1400. *** 38,44
  1401.    * Feel free to modify any of this as the need arises.  Note, however,
  1402.    * that running config.h.SH again will wipe out any changes you've made.
  1403.    * For a more permanent change edit config.sh and rerun config.h.SH.
  1404. !  * $Id: config.h.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1405.    *
  1406.    * $Log: config.h.SH,v $
  1407.   # Revision 4.4  1991/09/09  20:18:23  sob
  1408.  
  1409. --- 16,22 -----
  1410.    * Feel free to modify any of this as the need arises.  Note, however,
  1411.    * that running config.h.SH again will wipe out any changes you've made.
  1412.    * For a more permanent change edit config.sh and rerun config.h.SH.
  1413. !  * $Id: config.h.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1414.    *
  1415.    * $Log: config.h.SH,v $
  1416.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1417. ***************
  1418. *** 41,46
  1419.    * $Id: config.h.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1420.    *
  1421.    * $Log: config.h.SH,v $
  1422.   # Revision 4.4  1991/09/09  20:18:23  sob
  1423.   # release 4.4
  1424.   #
  1425.  
  1426. --- 19,27 -----
  1427.    * $Id: config.h.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1428.    *
  1429.    * $Log: config.h.SH,v $
  1430. + # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1431. + # Fixed problems with CTRLA flag.
  1432. + #
  1433.   # Revision 4.4  1991/09/09  20:18:23  sob
  1434.   # release 4.4
  1435.   #
  1436. ***************
  1437. *** 62,68
  1438.   
  1439.   /* name of the site.  May be overridden by HOSTFILE, gethostname, uname, etc. */
  1440.   #define SITENAME "$sitename"
  1441. ! $usehostfile#define HOSTFILE "$hostfile"
  1442.   
  1443.   /* domain name for the site */
  1444.   #define OURDOMAIN "$domain"
  1445.  
  1446. --- 43,49 -----
  1447.   
  1448.   /* name of the site.  May be overridden by HOSTFILE, gethostname, uname, etc. */
  1449.   #define SITENAME "$sitename"
  1450. ! #$usehostfile HOSTFILE "$hostfile"    /* */
  1451.   
  1452.   /* domain name for the site */
  1453.   #define OURDOMAIN "$domain"
  1454. ***************
  1455. *** 112,121
  1456.   #define CONTDIST "$contpref"
  1457.   
  1458.   
  1459. ! $strchr#define index   strchr    /* cultural */
  1460. ! $strchr#define rindex  strrchr    /*  differences? */
  1461. ! $memcpy#define bcopy(s,d,n)    memcpy((char*)d,(char*)s,(int)n)    /* Different */
  1462. ! $memcpy#define bzero(d,n)    memset((char*)d,0,(int)n)        /*  flavors. */
  1463.   #$rename    RENAME        /* is rename() a system call? */
  1464.   #$truncate    TRUNCATE    /* is truncate() available? */
  1465.   #$chsize    CHSIZE        /* is chsize() available? */
  1466.  
  1467. --- 93,102 -----
  1468.   #define CONTDIST "$contpref"
  1469.   
  1470.   
  1471. ! #$strchr index   strchr    /* cultural */
  1472. ! #$strchr rindex  strrchr    /*  differences? */
  1473. ! #$memcpy bcopy(s,d,n)    memcpy((char*)d,(char*)s,(int)n)    /* Different */
  1474. ! #$memcpy bzero(d,n)    memset((char*)d,0,(int)n)        /*  flavors. */
  1475.   #$rename    RENAME        /* is rename() a system call? */
  1476.   #$truncate    TRUNCATE    /* is truncate() available? */
  1477.   #$chsize    CHSIZE        /* is chsize() available? */
  1478. ***************
  1479. *** 120,127
  1480.   #$truncate    TRUNCATE    /* is truncate() available? */
  1481.   #$chsize    CHSIZE        /* is chsize() available? */
  1482.   #$tzset    TZSET        /* modern timezone functions? */
  1483. ! $novoid#define void int    /* is void to be avoided? */
  1484. ! $novfork#define vfork fork    /* is vfork too virtual? */
  1485.   #$sunos4    SUNOS4        /* running SunOS 4.X? */
  1486.   #$eunice    EUNICE        /* no linking? */
  1487.   #$eunice    VMS        /* not currently used, here just in case */
  1488.  
  1489. --- 101,108 -----
  1490.   #$truncate    TRUNCATE    /* is truncate() available? */
  1491.   #$chsize    CHSIZE        /* is chsize() available? */
  1492.   #$tzset    TZSET        /* modern timezone functions? */
  1493. ! #$novoid void int    /* is void to be avoided? */
  1494. ! #$novfork vfork fork    /* is vfork too virtual? */
  1495.   #$sunos4    SUNOS4        /* running SunOS 4.X? */
  1496.   #$eunice    EUNICE        /* no linking? */
  1497.   #$eunice    VMS        /* not currently used, here just in case */
  1498. ***************
  1499. *** 157,163
  1500.   #$internet    INTERNET    /* does our mailer do INTERNET addressing? */
  1501.   #$gethostname    GETHOSTNAME    /* do we have a gethostname function? */
  1502.   #$douname    DOUNAME        /* do we have a uname function? */
  1503. ! $phostname#define PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  1504.   #$norelay    NORELAY        /* 2.10.3 doesn't have Relay-Version line */
  1505.   #$isrrn    SERVER        /* rrn server code */
  1506.   $isrrn2#define SERVER_FILE    "$serverfile"    /* news server file */
  1507.  
  1508. --- 138,144 -----
  1509.   #$internet    INTERNET    /* does our mailer do INTERNET addressing? */
  1510.   #$gethostname    GETHOSTNAME    /* do we have a gethostname function? */
  1511.   #$douname    DOUNAME        /* do we have a uname function? */
  1512. ! #$phostname    PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  1513.   #$norelay    NORELAY        /* 2.10.3 doesn't have Relay-Version line */
  1514.   #$isrrn    SERVER        /* rrn server code */
  1515.   #$isrrn    SERVER_FILE    "$serverfile"    /* news server file */
  1516. ***************
  1517. *** 160,164
  1518.   $phostname#define PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  1519.   #$norelay    NORELAY        /* 2.10.3 doesn't have Relay-Version line */
  1520.   #$isrrn    SERVER        /* rrn server code */
  1521. ! $isrrn2#define SERVER_FILE    "$serverfile"    /* news server file */
  1522.   EOT
  1523.  
  1524. --- 141,145 -----
  1525.   #$phostname    PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  1526.   #$norelay    NORELAY        /* 2.10.3 doesn't have Relay-Version line */
  1527.   #$isrrn    SERVER        /* rrn server code */
  1528. ! #$isrrn    SERVER_FILE    "$serverfile"    /* news server file */
  1529.   EOT
  1530. Index: final.c
  1531. Prereq: 4.4
  1532. *** final.c    Fri Dec  6 23:49:48 1991
  1533. --- ../rn4.4.2/final.c    Sun Dec  1 12:09:11 1991
  1534. ***************
  1535. *** 1,4
  1536. ! /* $Id: final.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1537.    *
  1538.    * $Log: final.c,v $
  1539.    * Revision 4.4  1991/09/09  20:18:23  sob
  1540.  
  1541. --- 1,4 -----
  1542. ! /* $Id: final.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1543.    *
  1544.    * $Log: final.c,v $
  1545.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1546. ***************
  1547. *** 1,6
  1548.   /* $Id: final.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1549.    *
  1550.    * $Log: final.c,v $
  1551.    * Revision 4.4  1991/09/09  20:18:23  sob
  1552.    * release 4.4
  1553.    *
  1554.  
  1555. --- 1,9 -----
  1556.   /* $Id: final.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1557.    *
  1558.    * $Log: final.c,v $
  1559. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1560. +  * Patchlevel 2 changes
  1561. +  *
  1562.    * Revision 4.4  1991/09/09  20:18:23  sob
  1563.    * release 4.4
  1564.    *
  1565. ***************
  1566. *** 81,89
  1567.   finalize(status)
  1568.   int status;
  1569.   {
  1570. - #ifdef SERVER
  1571. -     char artname[MAXFILENAME];
  1572. - #endif /* SERVER */
  1573.       termlib_reset();
  1574.       if (bizarre)
  1575.       resetty();
  1576.  
  1577. --- 84,89 -----
  1578.   finalize(status)
  1579.   int status;
  1580.   {
  1581.       termlib_reset();
  1582.       if (bizarre)
  1583.       resetty();
  1584. Index: help.c
  1585. Prereq: 4.4
  1586. *** help.c    Fri Dec  6 23:49:34 1991
  1587. --- ../rn4.4.2/help.c    Sun Dec  1 12:09:16 1991
  1588. ***************
  1589. *** 1,4
  1590. ! /* $Id: help.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1591.    *
  1592.    * $Log: help.c,v $
  1593.    * Revision 4.4  1991/09/09  20:18:23  sob
  1594.  
  1595. --- 1,4 -----
  1596. ! /* $Id: help.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1597.    *
  1598.    * $Log: help.c,v $
  1599.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1600. ***************
  1601. *** 1,6
  1602.   /* $Id: help.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1603.    *
  1604.    * $Log: help.c,v $
  1605.    * Revision 4.4  1991/09/09  20:18:23  sob
  1606.    * release 4.4
  1607.    *
  1608.  
  1609. --- 1,9 -----
  1610.   /* $Id: help.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1611.    *
  1612.    * $Log: help.c,v $
  1613. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1614. +  * Patchlevel 2 changes
  1615. +  *
  1616.    * Revision 4.4  1991/09/09  20:18:23  sob
  1617.    * release 4.4
  1618.    *
  1619. ***************
  1620. *** 288,295
  1621.   d    Full name of newsgroup directory (%P/%c)\n\
  1622.   D    Distribution line from current article\n\
  1623.   e    The last command executed to extract data from an article\n\
  1624. ! E    The number of extra (unselected) articles, not counting the current\n\
  1625. !     one if it is unselected\n\
  1626.   ",NOMARKING)) ||
  1627.       (cmd = print_lines("\
  1628.   f    Who the current article is from\n\
  1629.  
  1630. --- 291,297 -----
  1631.   d    Full name of newsgroup directory (%P/%c)\n\
  1632.   D    Distribution line from current article\n\
  1633.   e    The last command executed to extract data from an article\n\
  1634. ! E    The last extraction directory\n\
  1635.   ",NOMARKING)) ||
  1636.       (cmd = print_lines("\
  1637.   f    Who the current article is from\n\
  1638. ***************
  1639. *** 328,335
  1640.   t    New To line derived from From and Reply-To (Internet format)\n\
  1641.   T    New To line derived from Path\n\
  1642.   u    Number of unread articles\n\
  1643. ! U    Number of unread articles not counting the current article (when\n\
  1644. !     threads are selected, the count only reflects selected articles)\n\
  1645.   x    News library directory\n\
  1646.   X    Rn library directory\n\
  1647.   z    Length of current article in bytes\n\
  1648.  
  1649. --- 330,336 -----
  1650.   t    New To line derived from From and Reply-To (Internet format)\n\
  1651.   T    New To line derived from Path\n\
  1652.   u    Number of unread articles\n\
  1653. ! U    Number of unread articles not counting the current article\n\
  1654.   x    News library directory\n\
  1655.   X    Rn library directory\n\
  1656.   z    Length of current article in bytes\n\
  1657. ***************
  1658. *** 333,339
  1659.   x    News library directory\n\
  1660.   X    Rn library directory\n\
  1661.   z    Length of current article in bytes\n\
  1662. - Z    Number of selected threads\n\
  1663.   ",NOMARKING)) ||
  1664.       (cmd = print_lines("\
  1665.   ~    Your home directory\n\
  1666.  
  1667. --- 334,339 -----
  1668.   x    News library directory\n\
  1669.   X    Rn library directory\n\
  1670.   z    Length of current article in bytes\n\
  1671.   ",NOMARKING)) ||
  1672.       (cmd = print_lines("\
  1673.   ~    Your home directory\n\
  1674. ***************
  1675. *** 338,344
  1676.       (cmd = print_lines("\
  1677.   ~    Your home directory\n\
  1678.   .    Directory containing . files\n\
  1679. ! #    A counter in multiple-article commands\n\
  1680.   $    Current process number\n\
  1681.   /    Last search string\n\
  1682.   ESC    Run preceding command through % interpretation\n\
  1683.  
  1684. --- 338,344 -----
  1685.       (cmd = print_lines("\
  1686.   ~    Your home directory\n\
  1687.   .    Directory containing . files\n\
  1688. ! #    A counter in multi-article saves\n\
  1689.   $    Current process number\n\
  1690.   /    Last search string\n\
  1691.   ESC    Run preceding command through % interpretation\n\
  1692. Index: intrp.c
  1693. Prereq: 4.4
  1694. *** intrp.c    Fri Dec  6 23:49:15 1991
  1695. --- ../rn4.4.2/intrp.c    Sun Dec  1 12:09:20 1991
  1696. ***************
  1697. *** 1,4
  1698. ! /* $Id: intrp.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1699.    *
  1700.    * $Log: intrp.c,v $
  1701.    * Revision 4.4  1991/09/09  20:18:23  sob
  1702.  
  1703. --- 1,4 -----
  1704. ! /* $Id: intrp.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1705.    *
  1706.    * $Log: intrp.c,v $
  1707.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1708. ***************
  1709. *** 1,6
  1710.   /* $Id: intrp.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1711.    *
  1712.    * $Log: intrp.c,v $
  1713.    * Revision 4.4  1991/09/09  20:18:23  sob
  1714.    * release 4.4
  1715.    *
  1716.  
  1717. --- 1,9 -----
  1718.   /* $Id: intrp.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1719.    *
  1720.    * $Log: intrp.c,v $
  1721. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1722. +  * Patchlevel 2 changes
  1723. +  *
  1724.    * Revision 4.4  1991/09/09  20:18:23  sob
  1725.    * release 4.4
  1726.    *
  1727. ***************
  1728. *** 36,41
  1729.   #include "INTERN.h"
  1730.   #include "intrp.h"
  1731.   
  1732.   char orgname[] = ORGNAME;
  1733.   
  1734.   /* name of this site */
  1735.  
  1736. --- 39,46 -----
  1737.   #include "INTERN.h"
  1738.   #include "intrp.h"
  1739.   
  1740. + static char * regexp_specials = "^$.*[\\/?";
  1741.   char orgname[] = ORGNAME;
  1742.   
  1743.   /* name of this site */
  1744. ***************
  1745. *** 139,145
  1746.       /* get the real name of the person (%N) */
  1747.       /* Must be done after logname is read in because BERKNAMES uses that */
  1748.   
  1749. !     strcpy(tcbuf,getrealname(getuid()));
  1750.       realname = savestr(tcbuf);
  1751.   
  1752.       /* name of header file (%h) */
  1753.  
  1754. --- 144,150 -----
  1755.       /* get the real name of the person (%N) */
  1756.       /* Must be done after logname is read in because BERKNAMES uses that */
  1757.   
  1758. !     strcpy(tcbuf,getrealname((long)getuid()));
  1759.       realname = savestr(tcbuf);
  1760.   
  1761.       /* name of header file (%h) */
  1762. ***************
  1763. *** 248,254
  1764.           tildename = savestr(scrbuf);
  1765.   #ifdef GETPWENT        /* getpwnam() is not the paragon of efficiency */
  1766.           {
  1767. !             struct passwd *getpwnam();
  1768.               struct passwd *pwd = getpwnam(tildename);
  1769.               if ( pwd == NULL){
  1770.               printf("%s is an unknown user",tildename) FLUSH;
  1771.  
  1772. --- 253,261 -----
  1773.           tildename = savestr(scrbuf);
  1774.   #ifdef GETPWENT        /* getpwnam() is not the paragon of efficiency */
  1775.           {
  1776. ! #ifdef notdef
  1777. !             struct passwd *getpwnam ANSI((char*));
  1778. ! #endif
  1779.               struct passwd *pwd = getpwnam(tildename);
  1780.               if ( pwd == NULL){
  1781.               printf("%s is an unknown user. Using default.\n",tildename) FLUSH;
  1782. ***************
  1783. *** 251,258
  1784.               struct passwd *getpwnam();
  1785.               struct passwd *pwd = getpwnam(tildename);
  1786.               if ( pwd == NULL){
  1787. !             printf("%s is an unknown user",tildename) FLUSH;
  1788. !             sig_catcher(0);
  1789.               }
  1790.               sprintf(scrbuf,"%s%s",pwd->pw_dir,s);
  1791.               tildedir = savestr(pwd->pw_dir);
  1792.  
  1793. --- 258,265 -----
  1794.   #endif
  1795.               struct passwd *pwd = getpwnam(tildename);
  1796.               if ( pwd == NULL){
  1797. !             printf("%s is an unknown user. Using default.\n",tildename) FLUSH;
  1798. !             return(Nullch);
  1799.               }
  1800.               sprintf(scrbuf,"%s%s",pwd->pw_dir,s);
  1801.               tildedir = savestr(pwd->pw_dir);
  1802. ***************
  1803. *** 428,433
  1804.       char scrbuf[512];
  1805.       bool upper = FALSE;
  1806.       bool lastcomp = FALSE;
  1807.       int metabit = 0;
  1808.   
  1809.       while (*pattern && (!stoppers || !index(stoppers,*pattern))) {
  1810.  
  1811. --- 435,441 -----
  1812.       char scrbuf[512];
  1813.       bool upper = FALSE;
  1814.       bool lastcomp = FALSE;
  1815. +     bool re_quote = FALSE;
  1816.       int metabit = 0;
  1817.   
  1818.       while (*pattern && (!stoppers || !index(stoppers,*pattern))) {
  1819. ***************
  1820. *** 438,443
  1821.       if (*pattern == '%' && pattern[1]) {
  1822.           upper = FALSE;
  1823.           lastcomp = FALSE;
  1824.           for (s=Nullch; !s; ) {
  1825.           switch (*++pattern) {
  1826.           case '^':
  1827.  
  1828. --- 446,452 -----
  1829.       if (*pattern == '%' && pattern[1]) {
  1830.           upper = FALSE;
  1831.           lastcomp = FALSE;
  1832. +         re_quote = FALSE;
  1833.           for (s=Nullch; !s; ) {
  1834.           switch (*++pattern) {
  1835.           case '^':
  1836. ***************
  1837. *** 446,451
  1838.           case '_':
  1839.               lastcomp = TRUE;
  1840.               break;
  1841.           case '/':
  1842.   #ifdef ARTSRCH
  1843.               s = scrbuf;
  1844.  
  1845. --- 455,463 -----
  1846.           case '_':
  1847.               lastcomp = TRUE;
  1848.               break;
  1849. +         case '\\':
  1850. +             re_quote = TRUE;
  1851. +             break;
  1852.           case '/':
  1853.   #ifdef ARTSRCH
  1854.               s = scrbuf;
  1855. ***************
  1856. *** 630,635
  1857.           case 'e':
  1858.               s = (extractprog ? extractprog : "-");
  1859.               break;
  1860.           case 'f':            /* from line */
  1861.   #ifdef ASYNC_PARSE
  1862.               parse_maybe(art);
  1863.  
  1864. --- 642,650 -----
  1865.           case 'e':
  1866.               s = (extractprog ? extractprog : "-");
  1867.               break;
  1868. +         case 'E':
  1869. +             s = extractdest;
  1870. +             break;
  1871.           case 'f':            /* from line */
  1872.   #ifdef ASYNC_PARSE
  1873.               parse_maybe(art);
  1874. ***************
  1875. *** 878,889
  1876.           if (islower(*t))
  1877.               *t = toupper(*t);
  1878.           }
  1879. !         i = metabit;        /* maybe get into register */
  1880. !         if (s == dest) {
  1881. !         while (*dest) {
  1882. !             if (--destsize <= 0)
  1883. !             abort_interp();
  1884. !             *dest++ |= i;
  1885.           }
  1886.           }
  1887.           else {
  1888.  
  1889. --- 893,914 -----
  1890.           if (islower(*t))
  1891.               *t = toupper(*t);
  1892.           }
  1893. !         /* Do we have room left? */
  1894. !         i = strlen(s);
  1895. !         if (destsize <= i)
  1896. !         abort_interp();
  1897. !         destsize -= i;    /* adjust the size now. */
  1898. !         /* A maze of twisty little conditions, all alike... */
  1899. !         if (metabit) {
  1900. !         /* set meta bit while copying. */
  1901. !         i = metabit;        /* maybe get into register */
  1902. !         if (s == dest) {
  1903. !             while (*dest)
  1904. !             *dest++ |= i;
  1905. !         } else {
  1906. !             while (*s)
  1907. !             *dest++ = *s++ | i;
  1908.           }
  1909.   
  1910.           } else if (re_quote) {
  1911. ***************
  1912. *** 885,892
  1913.               abort_interp();
  1914.               *dest++ |= i;
  1915.           }
  1916. !         }
  1917. !         else {
  1918.           while (*s) {
  1919.               if (--destsize <= 0)
  1920.               abort_interp();
  1921.  
  1922. --- 910,925 -----
  1923.               while (*s)
  1924.               *dest++ = *s++ | i;
  1925.           }
  1926. !         } else if (re_quote) {
  1927. !         /* put a backslash before regexp specials while copying. */
  1928. !         if (s == dest) {
  1929. !             /* copy out so we can copy in. */
  1930. !             safecpy(scrbuf, s, sizeof scrbuf);
  1931. !             s = scrbuf;
  1932. !             if (i > sizeof scrbuf)    /* we truncated, ack! */
  1933. !             destsize += i - sizeof scrbuf;
  1934. !         }
  1935.           while (*s) {
  1936.               if (index(regexp_specials, *s)) {
  1937.               if (--destsize <= 0)
  1938. ***************
  1939. *** 888,896
  1940.           }
  1941.           else {
  1942.           while (*s) {
  1943. !             if (--destsize <= 0)
  1944. !             abort_interp();
  1945. !             *dest++ = *s++ | i;
  1946.           }
  1947.           }
  1948.       }
  1949.  
  1950. --- 921,932 -----
  1951.               destsize += i - sizeof scrbuf;
  1952.           }
  1953.           while (*s) {
  1954. !             if (index(regexp_specials, *s)) {
  1955. !             if (--destsize <= 0)
  1956. !                 abort_interp();
  1957. !             *dest++ = '\\';
  1958. !             }
  1959. !             *dest++ = *s++;
  1960.           }
  1961.   
  1962.           } else {
  1963. ***************
  1964. *** 892,897
  1965.               abort_interp();
  1966.               *dest++ = *s++ | i;
  1967.           }
  1968.           }
  1969.       }
  1970.       else {
  1971.  
  1972. --- 928,942 -----
  1973.               }
  1974.               *dest++ = *s++;
  1975.           }
  1976. +         } else {
  1977. +         /* straight copy. */
  1978. +         if (s == dest) {
  1979. +             dest += i;
  1980. +         } else {
  1981. +             while (*s)
  1982. +             *dest++ = *s++;
  1983. +         }
  1984.           }
  1985.       }
  1986.       else {
  1987. ***************
  1988. *** 1046,1052
  1989.   
  1990.   char *
  1991.   getrealname(uid)
  1992. ! int uid;
  1993.   {
  1994.       char *s, *c;
  1995.       char tmpbuf[512];
  1996.  
  1997. --- 1091,1097 -----
  1998.   
  1999.   char *
  2000.   getrealname(uid)
  2001. ! long uid;
  2002.   {
  2003.       char *s, *c;
  2004.       char tmpbuf[512];
  2005. ***************
  2006. *** 1050,1056
  2007.   {
  2008.       char *s, *c;
  2009.       char tmpbuf[512];
  2010.   #ifdef PASSNAMES
  2011.   #ifdef GETPWENT
  2012.   #ifndef convex
  2013.  
  2014. --- 1095,1100 -----
  2015.   {
  2016.       char *s, *c;
  2017.       char tmpbuf[512];
  2018.   #ifdef PASSNAMES
  2019.   #ifdef GETPWENT
  2020.   #ifdef notdef
  2021. ***************
  2022. *** 1053,1060
  2023.   
  2024.   #ifdef PASSNAMES
  2025.   #ifdef GETPWENT
  2026. ! #ifndef convex
  2027. !     struct passwd *getpwuid();
  2028.   #endif
  2029.       struct passwd *pwd = getpwuid(uid);
  2030.       
  2031.  
  2032. --- 1097,1104 -----
  2033.       char tmpbuf[512];
  2034.   #ifdef PASSNAMES
  2035.   #ifdef GETPWENT
  2036. ! #ifdef notdef
  2037. !     struct passwd *getpwuid ANSI((uid_t));
  2038.   #endif
  2039.       struct passwd *pwd = getpwuid(uid);
  2040.       
  2041. ***************
  2042. *** 1061,1067
  2043.       s = pwd->pw_gecos;
  2044.   #else
  2045.       int i;
  2046.       getpw(uid, tmpbuf);
  2047.       for (s=tmpbuf, i=GCOSFIELD-1; i; i--) {
  2048.       if (s)
  2049.  
  2050. --- 1105,1110 -----
  2051.       s = pwd->pw_gecos;
  2052.   #else
  2053.       int i;
  2054.       getpw(uid, tmpbuf);
  2055.       for (s=tmpbuf, i=GCOSFIELD-1; i; i--) {
  2056.       if (s)
  2057. Index: intrp.h
  2058. Prereq: 4.4
  2059. *** intrp.h    Fri Dec  6 23:50:08 1991
  2060. --- ../rn4.4.2/intrp.h    Sun Dec  1 12:10:23 1991
  2061. ***************
  2062. *** 1,4
  2063. ! /* $Id: intrp.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  2064.    *
  2065.    * $Log: intrp.h,v $
  2066.    * Revision 4.4  1991/09/09  20:18:23  sob
  2067.  
  2068. --- 1,4 -----
  2069. ! /* $Id: intrp.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2070.    *
  2071.    * $Log: intrp.h,v $
  2072.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2073. ***************
  2074. *** 1,6
  2075.   /* $Id: intrp.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  2076.    *
  2077.    * $Log: intrp.h,v $
  2078.    * Revision 4.4  1991/09/09  20:18:23  sob
  2079.    * release 4.4
  2080.    *
  2081.  
  2082. --- 1,9 -----
  2083.   /* $Id: intrp.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2084.    *
  2085.    * $Log: intrp.h,v $
  2086. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2087. +  * Patchlevel 2 changes
  2088. +  *
  2089.    * Revision 4.4  1991/09/09  20:18:23  sob
  2090.    * release 4.4
  2091.    *
  2092. ***************
  2093. *** 39,42
  2094.   char    *dointerp ANSI((char *,int,char *,char *));
  2095.   void    interp ANSI((char *,int,char *));
  2096.   void    refscpy ANSI((char *,int,char *));
  2097. ! char    *getrealname ANSI((int));
  2098.  
  2099. --- 42,45 -----
  2100.   char    *dointerp ANSI((char *,int,char *,char *));
  2101.   void    interp ANSI((char *,int,char *));
  2102.   void    refscpy ANSI((char *,int,char *));
  2103. ! char    *getrealname ANSI((long));
  2104. Index: newsetup.SH
  2105. Prereq: 4.4.1.1
  2106. *** newsetup.SH    Fri Dec  6 23:49:56 1991
  2107. --- ../rn4.4.2/newsetup.SH    Sun Dec  1 12:08:17 1991
  2108. ***************
  2109. *** 5,11
  2110.   $spitshell >newsetup <<!GROK!THIS!
  2111.   $startsh
  2112.   #
  2113. ! # $Id: newsetup.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2114.   # 
  2115.   # $Log: newsetup.SH,v $
  2116.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2117.  
  2118. --- 5,11 -----
  2119.   $spitshell >newsetup <<!GROK!THIS!
  2120.   $startsh
  2121.   #
  2122. ! # $Id: newsetup.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2123.   # 
  2124.   # $Log: newsetup.SH,v $
  2125.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2126. ***************
  2127. *** 8,13
  2128.   # $Id: newsetup.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2129.   # 
  2130.   # $Log: newsetup.SH,v $
  2131.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2132.   # various fixed
  2133.   #
  2134.  
  2135. --- 8,19 -----
  2136.   # $Id: newsetup.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2137.   # 
  2138.   # $Log: newsetup.SH,v $
  2139. + # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2140. + # Fixed problems with CTRLA flag.
  2141. + #
  2142. + # Revision 4.4.1.2  1991/11/09  20:54:14  sob
  2143. + # Changes from eggert@twinsun.com to get rid of old code.
  2144. + #
  2145.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2146.   # various fixed
  2147.   #
  2148. ***************
  2149. *** 102,111
  2150.   ' >\$newsrc
  2151.   
  2152.   #NNTP$rm -f \$active
  2153. - $rm -f /tmp/n.misc\$\$ /tmp/n.sci\$\$ /tmp/n.soc\$\$ /tmp/n.news\$\$ /tmp/n.comp\$\$
  2154. - $rm -f /tmp/n.\$cont\$\$ /tmp/n.\$city\$\$ /tmp/n.\$cntry\$\$ /tmp/n.\$state\$\$
  2155. - $rm -f /tmp/n.to\$\$ /tmp/n.\$organization\$\$ /tmp/n.\$locorg\$\$ /tmp/n.test\$\$
  2156. - $rm -f /tmp/n.tmp\$\$ /tmp/n.local\$\$ /tmp/n.rec\$\$
  2157.   
  2158.   $cat <<'EOH'
  2159.   Done.
  2160.  
  2161. --- 108,113 -----
  2162.   ' >\$newsrc
  2163.   
  2164.   #NNTP$rm -f \$active
  2165.   
  2166.   $cat <<'EOH'
  2167.   Done.
  2168. Index: newsgroups.SH
  2169. Prereq: 4.4.1.1
  2170. *** newsgroups.SH    Fri Dec  6 23:49:57 1991
  2171. --- ../rn4.4.2/newsgroups.SH    Sun Dec  1 12:08:33 1991
  2172. ***************
  2173. *** 4,10
  2174.   echo "Extracting newsgroups (with variable substitutions)"
  2175.   $spitshell >newsgroups <<!GROK!THIS!
  2176.   $startsh
  2177. ! # $Id: newsgroups.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2178.   # 
  2179.   # $Log: newsgroups.SH,v $
  2180.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2181.  
  2182. --- 4,10 -----
  2183.   echo "Extracting newsgroups (with variable substitutions)"
  2184.   $spitshell >newsgroups <<!GROK!THIS!
  2185.   $startsh
  2186. ! # $Id: newsgroups.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2187.   # 
  2188.   # $Log: newsgroups.SH,v $
  2189.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2190. ***************
  2191. *** 7,12
  2192.   # $Id: newsgroups.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2193.   # 
  2194.   # $Log: newsgroups.SH,v $
  2195.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2196.   # various fixed
  2197.   #
  2198.  
  2199. --- 7,15 -----
  2200.   # $Id: newsgroups.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2201.   # 
  2202.   # $Log: newsgroups.SH,v $
  2203. + # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2204. + # Patchlevel 2 changes
  2205. + #
  2206.   # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2207.   # various fixed
  2208.   #
  2209. Index: ngdata.c
  2210. Prereq: 4.4.1.1
  2211. *** ngdata.c    Fri Dec  6 23:49:39 1991
  2212. --- ../rn4.4.2/ngdata.c    Sun Dec  1 12:09:28 1991
  2213. ***************
  2214. *** 1,4
  2215. ! /* $Id: ngdata.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2216.    *
  2217.    * $Log: ngdata.c,v $
  2218.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2219.  
  2220. --- 1,4 -----
  2221. ! /* $Id: ngdata.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2222.    *
  2223.    * $Log: ngdata.c,v $
  2224.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2225. ***************
  2226. *** 1,6
  2227.   /* $Id: ngdata.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2228.    *
  2229.    * $Log: ngdata.c,v $
  2230.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2231.    * Some adaptions for CNEWS
  2232.    *
  2233.  
  2234. --- 1,9 -----
  2235.   /* $Id: ngdata.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2236.    *
  2237.    * $Log: ngdata.c,v $
  2238. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2239. +  * Patchlevel 2 changes
  2240. +  *
  2241.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2242.    * Some adaptions for CNEWS
  2243.    *
  2244. ***************
  2245. *** 43,70
  2246.   {
  2247.       char *cp;
  2248.   
  2249. - /* The following is only for systems that do not zero globals properly */
  2250. - #ifdef ZEROGLOB
  2251. - # ifdef CACHEFIRST
  2252. -   {
  2253. -     int i;
  2254. -     for (i=0; i<maxrcline; i++)
  2255. -     abs1st[i] = 0;
  2256. -   }
  2257. - # endif
  2258. - #endif    /* ZEROGLOB */
  2259. - /* The following is only for systems that do not zero globals properly */
  2260. - #ifdef ZEROGLOB
  2261. - # ifdef CACHEFIRST
  2262. -   {
  2263. -     int i;
  2264. -     for (i=0; i<MAXRCLINE; i++)
  2265. -     abs1st[i] = 0;
  2266. -   }
  2267. - # endif
  2268. - #endif    /* ZEROGLOB */
  2269.       /* open the active file */
  2270.   
  2271.   #ifdef SERVER
  2272.  
  2273. --- 46,51 -----
  2274.   {
  2275.       char *cp;
  2276.   
  2277.       /* open the active file */
  2278.   
  2279.   #ifdef SERVER
  2280. ***************
  2281. *** 252,261
  2282.   ART_NUM ngsize;
  2283.   {
  2284.       ART_NUM a1st;
  2285. - #ifndef MININACT
  2286. -     ART_NUM x,y;
  2287. - #endif
  2288.   #ifdef CACHEFIRST
  2289.       if (a1st = abs1st[ngnum])
  2290.       return a1st;
  2291.  
  2292. --- 233,238 -----
  2293.   ART_NUM ngsize;
  2294.   {
  2295.       ART_NUM a1st;
  2296.   #ifdef CACHEFIRST
  2297.       if (a1st = abs1st[ngnum])
  2298.       return a1st;
  2299. ***************
  2300. *** 268,273
  2301.       return abs1st;
  2302.   # endif
  2303.   #else
  2304.       getngsize(ngnum); /* set moderated as side effect */
  2305.       sprintf(ser_line,"GROUP %s",rcline[ngnum]);
  2306.       put_server(ser_line);
  2307.  
  2308. --- 245,251 -----
  2309.       return abs1st;
  2310.   # endif
  2311.   #else
  2312. +     ART_NUM x,y;
  2313.       getngsize(ngnum); /* set moderated as side effect */
  2314.       sprintf(ser_line,"GROUP %s",rcline[ngnum]);
  2315.       put_server(ser_line);
  2316. ***************
  2317. *** 297,303
  2318.   {
  2319.       return(floor);        /* dirname not used */
  2320.   }
  2321. ! #else
  2322.   ART_NUM
  2323.   getabsfirst(ngnum,ngsize)
  2324.   register NG_NUM ngnum;
  2325.  
  2326. --- 275,283 -----
  2327.   {
  2328.       return(floor);        /* dirname not used */
  2329.   }
  2330. ! #else /*SERVER*/
  2331.   ART_NUM
  2332.   getabsfirst(ngnum,ngsize)
  2333.   register NG_NUM ngnum;
  2334. Index: rcstuff.c
  2335. Prereq: 4.4
  2336. *** rcstuff.c    Fri Dec  6 23:49:08 1991
  2337. --- ../rn4.4.2/rcstuff.c    Sun Dec  1 12:09:37 1991
  2338. ***************
  2339. *** 1,4
  2340. ! /* $Id: rcstuff.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  2341.    *
  2342.    * $Log: rcstuff.c,v $
  2343.    * Revision 4.4  1991/09/09  20:27:37  sob
  2344.  
  2345. --- 1,4 -----
  2346. ! /* $Id: rcstuff.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2347.    *
  2348.    * $Log: rcstuff.c,v $
  2349.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2350. ***************
  2351. *** 1,6
  2352.   /* $Id: rcstuff.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  2353.    *
  2354.    * $Log: rcstuff.c,v $
  2355.    * Revision 4.4  1991/09/09  20:27:37  sob
  2356.    * release 4.4
  2357.    *
  2358.  
  2359. --- 1,9 -----
  2360.   /* $Id: rcstuff.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2361.    *
  2362.    * $Log: rcstuff.c,v $
  2363. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2364. +  * Patchlevel 2 changes
  2365. +  *
  2366.    * Revision 4.4  1991/09/09  20:27:37  sob
  2367.    * release 4.4
  2368.    *
  2369. ***************
  2370. *** 63,69
  2371.       char *cp;
  2372.   #endif /* SERVER */
  2373.       bool found = FALSE;
  2374. !     maxrcline = 1500;
  2375.       /* make filenames */
  2376.   
  2377.   #ifdef SERVER
  2378.  
  2379. --- 66,72 -----
  2380.       char *cp;
  2381.   #endif /* SERVER */
  2382.       bool found = FALSE;
  2383.       /* make filenames */
  2384.   
  2385.   #ifdef SERVER
  2386. ***************
  2387. *** 94,112
  2388.       writesoft = TRUE;
  2389.   
  2390.       /* allocate memory for rc file globals */
  2391. ! #ifdef CACHEFIRST
  2392. !     abs1st = (ART_NUM *) safemalloc(maxrcline * sizeof(ART_NUM));
  2393. !     for (i=0; i<maxrcline; i++)
  2394. !     abs1st[i] = 0;
  2395. ! #endif
  2396. ! #if defined(DEBUGGING) 
  2397. !     ngmax = (ART_NUM *) safemalloc(maxrcline * sizeof(ART_NUM));
  2398. ! #endif
  2399. !     rcline = (char **) safemalloc(maxrcline * sizeof(char*));
  2400. !     toread = (ART_UNREAD *) safemalloc(maxrcline * sizeof(ART_UNREAD));
  2401. !     rcchar = (char *) safemalloc(maxrcline * sizeof(char));
  2402. !     rcnums = (char *) safemalloc(maxrcline * sizeof(char));
  2403. !     softptr = (ACT_POS *) safemalloc(maxrcline * sizeof(ACT_POS));
  2404.   
  2405.       /* read in the .newsrc file */
  2406.   
  2407.  
  2408. --- 97,103 -----
  2409.       writesoft = TRUE;
  2410.   
  2411.       /* allocate memory for rc file globals */
  2412. !     grow_rc_arrays(1500);
  2413.   
  2414.       /* read in the .newsrc file */
  2415.   
  2416. ***************
  2417. *** 122,131
  2418.           nextrcline--;        /* compensate for loop increment */
  2419.           continue;
  2420.       }
  2421. !     if (newng >= maxrcline) {    /* check for overflow */
  2422. !         maxrcline += 500;
  2423. !         grow_rc_arrays( maxrcline );
  2424. !     }
  2425.       if (tmpfp != Nullfp && fgets(tmpbuf,10,tmpfp) != Nullch)
  2426.           softptr[newng] = atol(tmpbuf);
  2427.       else
  2428.  
  2429. --- 113,120 -----
  2430.           nextrcline--;        /* compensate for loop increment */
  2431.           continue;
  2432.       }
  2433. !     if (newng >= maxrcline)        /* check for overflow */
  2434. !         grow_rc_arrays(maxrcline + 500);
  2435.       if (tmpfp != Nullfp && fgets(tmpbuf,10,tmpfp) != Nullch)
  2436.           softptr[newng] = atol(tmpbuf);
  2437.       else
  2438. ***************
  2439. *** 332,341
  2440.           }
  2441.   #else /* not SERVER */
  2442.   
  2443. !     if (ng >= maxrcline) {        /* check for overflow */
  2444. !         maxrcline += 25;
  2445. !         grow_rc_arrays( maxrcline );
  2446. !     }
  2447.   
  2448.       if ((softptr[ng] = findact(buf,ngname,strlen(ngname),0L)) < 0 ) {
  2449.   
  2450.  
  2451. --- 321,328 -----
  2452.           }
  2453.   #else /* not SERVER */
  2454.   
  2455. !     if (ng >= maxrcline)        /* check for overflow */
  2456. !         grow_rc_arrays(maxrcline + 25);
  2457.   
  2458.       if ((softptr[ng] = findact(buf,ngname,strlen(ngname),0L)) < 0 ) {
  2459.   
  2460. ***************
  2461. *** 367,373
  2462.       ELSE
  2463.   #endif
  2464.   #ifdef TERSE
  2465. !         sprintf(promptbuf,"\nSubscribe %s? [ynY] ",ngname);
  2466.   #endif
  2467.   reask_add:
  2468.       in_char(promptbuf,'A');
  2469.  
  2470. --- 354,360 -----
  2471.       ELSE
  2472.   #endif
  2473.   #ifdef TERSE
  2474. !         sprintf(promptbuf,"\nSubscribe %s? [ynYN] ",ngname);
  2475.   #endif
  2476.   reask_add:
  2477.       in_char(promptbuf,'A');
  2478. ***************
  2479. *** 485,494
  2480.       register NG_NUM newng = nextrcline++;
  2481.                       /* increment max rcline index */
  2482.   
  2483. !     if (newng >= maxrcline) {        /* check for overflow */
  2484. !     maxrcline += 25;
  2485. !     grow_rc_arrays( maxrcline );
  2486. !     }
  2487.   
  2488.       rcnums[newng] = strlen(ngn) + 1;
  2489.       rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1));
  2490.  
  2491. --- 472,479 -----
  2492.       register NG_NUM newng = nextrcline++;
  2493.                       /* increment max rcline index */
  2494.   
  2495. !     if (newng >= maxrcline)        /* check for overflow */
  2496. !     grow_rc_arrays(maxrcline + 25);
  2497.   
  2498.       rcnums[newng] = strlen(ngn) + 1;
  2499.       rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1));
  2500. ***************
  2501. *** 1051,1057
  2502.   #endif
  2503.   }
  2504.   
  2505. ! static void grow_rc_arrays( newsize )
  2506.   int newsize;
  2507.   {
  2508.   #ifdef CACHEFIRST
  2509.  
  2510. --- 1036,1055 -----
  2511.   #endif
  2512.   }
  2513.   
  2514. ! static char *
  2515. ! grow(ptr, elem, size)
  2516. ! char *ptr;
  2517. ! int elem;
  2518. ! int size;
  2519. ! {
  2520. !     if (ptr != NULL)
  2521. !     return saferealloc(ptr, (MEM_SIZE)elem * size);
  2522. !     else
  2523. !     return safemalloc((MEM_SIZE)elem * size);
  2524. ! }
  2525. ! static void
  2526. ! grow_rc_arrays(newsize)
  2527.   int newsize;
  2528.   {
  2529.   #ifdef CACHEFIRST
  2530. ***************
  2531. *** 1055,1061
  2532.   int newsize;
  2533.   {
  2534.   #ifdef CACHEFIRST
  2535. !     abs1st = (ART_NUM *) saferealloc(abs1st, newsize * sizeof(ART_NUM));
  2536.   #endif
  2537.   #if defined(DEBUGGING)
  2538.       ngmax = (ART_NUM *) saferealloc(ngmax, newsize * sizeof(ART_NUM));
  2539.  
  2540. --- 1053,1063 -----
  2541.   int newsize;
  2542.   {
  2543.   #ifdef CACHEFIRST
  2544. !     register int i;
  2545. !     abs1st = (ART_NUM *) grow((char*)abs1st, newsize, sizeof(ART_NUM));
  2546. !     for (i=maxrcline; i < newsize; i++)
  2547. !     abs1st[i] = 0;
  2548.   #endif
  2549.   #if defined(DEBUGGING)
  2550.       ngmax = (ART_NUM *) grow((char*)ngmax, newsize, sizeof(ART_NUM));
  2551. ***************
  2552. *** 1058,1064
  2553.       abs1st = (ART_NUM *) saferealloc(abs1st, newsize * sizeof(ART_NUM));
  2554.   #endif
  2555.   #if defined(DEBUGGING)
  2556. !     ngmax = (ART_NUM *) saferealloc(ngmax, newsize * sizeof(ART_NUM));
  2557.   #endif
  2558.       rcline = (char **) saferealloc(rcline, newsize * sizeof(char*));
  2559.       toread = (ART_UNREAD *) saferealloc(toread, newsize * sizeof(ART_UNREAD));
  2560.  
  2561. --- 1060,1066 -----
  2562.       abs1st[i] = 0;
  2563.   #endif
  2564.   #if defined(DEBUGGING)
  2565. !     ngmax = (ART_NUM *) grow((char*)ngmax, newsize, sizeof(ART_NUM));
  2566.   #endif
  2567.       rcline = (char **) grow((char*)rcline, newsize, sizeof(char*));
  2568.       toread = (ART_UNREAD *) grow((char*)toread, newsize, sizeof(ART_UNREAD));
  2569. ***************
  2570. *** 1060,1069
  2571.   #if defined(DEBUGGING)
  2572.       ngmax = (ART_NUM *) saferealloc(ngmax, newsize * sizeof(ART_NUM));
  2573.   #endif
  2574. !     rcline = (char **) saferealloc(rcline, newsize * sizeof(char*));
  2575. !     toread = (ART_UNREAD *) saferealloc(toread, newsize * sizeof(ART_UNREAD));
  2576. !     rcchar = (char *) saferealloc(rcchar, newsize * sizeof(char));
  2577. !     rcnums = (char *) saferealloc(rcnums, newsize * sizeof(char));
  2578. !     softptr = (ACT_POS *) saferealloc(softptr, newsize * sizeof(ACT_POS));
  2579.       return;
  2580.   }
  2581.  
  2582. --- 1062,1072 -----
  2583.   #if defined(DEBUGGING)
  2584.       ngmax = (ART_NUM *) grow((char*)ngmax, newsize, sizeof(ART_NUM));
  2585.   #endif
  2586. !     rcline = (char **) grow((char*)rcline, newsize, sizeof(char*));
  2587. !     toread = (ART_UNREAD *) grow((char*)toread, newsize, sizeof(ART_UNREAD));
  2588. !     rcchar = (char *) grow(rcchar, newsize, sizeof(char));
  2589. !     rcnums = (char *) grow(rcnums, newsize, sizeof(char));
  2590. !     softptr = (ACT_POS *) grow((char*)softptr, newsize, sizeof(ACT_POS));
  2591. !     maxrcline = newsize;
  2592.       return;
  2593.   }
  2594. Index: rcstuff.h
  2595. Prereq: 4.4
  2596. *** rcstuff.h    Fri Dec  6 23:50:02 1991
  2597. --- ../rn4.4.2/rcstuff.h    Sun Dec  1 12:10:36 1991
  2598. ***************
  2599. *** 1,4
  2600. ! /* $Id: rcstuff.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  2601.    *
  2602.    * $Log: rcstuff.h,v $
  2603.    * Revision 4.4  1991/09/09  20:27:37  sob
  2604.  
  2605. --- 1,4 -----
  2606. ! /* $Id: rcstuff.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2607.    *
  2608.    * $Log: rcstuff.h,v $
  2609.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2610. ***************
  2611. *** 1,6
  2612.   /* $Id: rcstuff.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  2613.    *
  2614.    * $Log: rcstuff.h,v $
  2615.    * Revision 4.4  1991/09/09  20:27:37  sob
  2616.    * release 4.4
  2617.    *
  2618.  
  2619. --- 1,9 -----
  2620.   /* $Id: rcstuff.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2621.    *
  2622.    * $Log: rcstuff.h,v $
  2623. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2624. +  * Patchlevel 2 changes
  2625. +  *
  2626.    * Revision 4.4  1991/09/09  20:27:37  sob
  2627.    * release 4.4
  2628.    *
  2629. ***************
  2630. *** 36,41
  2631.   EXT ACT_POS *softptr INIT(NULL);
  2632.               /* likely ptr to active file entry for newsgroup */
  2633.   EXT bool paranoid INIT(FALSE);    /* did we detect some inconsistency in .newsrc? */
  2634.   
  2635.   EXT    int    maxrcline;      /* current maximum # of lines in .newsrc */
  2636.   bool    rcstuff_init ANSI((void));
  2637.  
  2638. --- 39,45 -----
  2639.   EXT ACT_POS *softptr INIT(NULL);
  2640.               /* likely ptr to active file entry for newsgroup */
  2641.   EXT bool paranoid INIT(FALSE);    /* did we detect some inconsistency in .newsrc? */
  2642. + EXT int maxrcline INIT(0);    /* current maximum # of lines in .newsrc */
  2643.   
  2644.   bool    rcstuff_init ANSI((void));
  2645.   bool    get_ng ANSI((char *,bool));    /* return TRUE if newsgroup can be found or added */
  2646. ***************
  2647. *** 37,43
  2648.               /* likely ptr to active file entry for newsgroup */
  2649.   EXT bool paranoid INIT(FALSE);    /* did we detect some inconsistency in .newsrc? */
  2650.   
  2651. - EXT    int    maxrcline;      /* current maximum # of lines in .newsrc */
  2652.   bool    rcstuff_init ANSI((void));
  2653.   bool    get_ng ANSI((char *,bool));    /* return TRUE if newsgroup can be found or added */
  2654.   NG_NUM    add_newsgroup ANSI((char *,char));
  2655.  
  2656. --- 41,46 -----
  2657.   EXT bool paranoid INIT(FALSE);    /* did we detect some inconsistency in .newsrc? */
  2658.   EXT int maxrcline INIT(0);    /* current maximum # of lines in .newsrc */
  2659.   
  2660.   bool    rcstuff_init ANSI((void));
  2661.   bool    get_ng ANSI((char *,bool));    /* return TRUE if newsgroup can be found or added */
  2662.   NG_NUM    add_newsgroup ANSI((char *,char));
  2663. ***************
  2664. *** 52,55
  2665.   void    newsrc_check ANSI((void));
  2666.   void    write_rc ANSI((void));
  2667.   void    get_old_rc ANSI((void));
  2668.  
  2669. --- 55,57 -----
  2670.   void    newsrc_check ANSI((void));
  2671.   void    write_rc ANSI((void));
  2672.   void    get_old_rc ANSI((void));
  2673. Index: respond.c
  2674. Prereq: 4.4.1.1
  2675. *** respond.c    Fri Dec  6 23:49:30 1991
  2676. --- ../rn4.4.2/respond.c    Sun Dec  1 12:09:41 1991
  2677. ***************
  2678. *** 1,4
  2679. ! /* $Id: respond.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2680.    *
  2681.    * $Log: respond.c,v $
  2682.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2683.  
  2684. --- 1,4 -----
  2685. ! /* $Id: respond.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2686.    *
  2687.    * $Log: respond.c,v $
  2688.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2689. ***************
  2690. *** 1,6
  2691.   /* $Id: respond.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  2692.    *
  2693.    * $Log: respond.c,v $
  2694.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2695.    * Some adaptions for CNEWS
  2696.    *
  2697.  
  2698. --- 1,9 -----
  2699.   /* $Id: respond.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2700.    *
  2701.    * $Log: respond.c,v $
  2702. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2703. +  * Patchlevel 2 changes
  2704. +  *
  2705.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  2706.    * Some adaptions for CNEWS
  2707.    *
  2708. ***************
  2709. *** 33,38
  2710.   #include "rn.h"
  2711.   #include "artio.h"
  2712.   #include "final.h"
  2713.   #include "uudecode.h"
  2714.   #include "INTERN.h"
  2715.   #include "respond.h"
  2716.  
  2717. --- 36,42 -----
  2718.   #include "rn.h"
  2719.   #include "artio.h"
  2720.   #include "final.h"
  2721. + #include "bits.h"
  2722.   #include "uudecode.h"
  2723.   #include "INTERN.h"
  2724.   #include "respond.h"
  2725. ***************
  2726. *** 111,118
  2727.           s = buf;
  2728.       }
  2729.       else {
  2730. !         if (savedest)
  2731. !         strcpy(s, savedest);
  2732.           if (custom_extract)
  2733.           cmdstr = extractprog;
  2734.           else
  2735.  
  2736. --- 115,122 -----
  2737.           s = buf;
  2738.       }
  2739.       else {
  2740. !         if (extractdest)
  2741. !         strcpy(s, extractdest);
  2742.           if (custom_extract)
  2743.           cmdstr = extractprog;
  2744.           else
  2745. ***************
  2746. *** 146,152
  2747.       }
  2748.       if (uu_out != Nullfp) {
  2749.           printf("Continuing %s:%s\n", uu_fname,
  2750. !         cmd != '\0' && strNE(savedest,s) ?
  2751.            " (Ignoring conflicting directory)" : nullstr ) FLUSH;
  2752.           uudecode(artfp);
  2753.       }
  2754.  
  2755. --- 150,156 -----
  2756.       }
  2757.       if (uu_out != Nullfp) {
  2758.           printf("Continuing %s:%s\n", uu_fname,
  2759. !         cmd != '\0' && strNE(extractdest,s) ?
  2760.            " (Ignoring conflicting directory)" : nullstr ) FLUSH;
  2761.           uudecode(artfp);
  2762.       }
  2763. ***************
  2764. *** 151,159
  2765.           uudecode(artfp);
  2766.       }
  2767.       else {
  2768. !         if (savedest)
  2769. !         free(savedest);
  2770. !         s = savedest = savestr(s);    /* make it handy for %b */
  2771.           if (makedir(s, MD_DIR)) {    /* ensure directory exists */
  2772.           int_count++;
  2773.           return SAVE_DONE;
  2774.  
  2775. --- 155,163 -----
  2776.           uudecode(artfp);
  2777.       }
  2778.       else {
  2779. !         if (extractdest)
  2780. !         free(extractdest);
  2781. !         s = extractdest = savestr(s); /* make it handy for %E */
  2782.           if (makedir(s, MD_DIR)) {    /* ensure directory exists */
  2783.           int_count++;
  2784.           return SAVE_DONE;
  2785. ***************
  2786. *** 222,228
  2787.               cnt = 0;
  2788.               fseek(artfp,(long)-strlen(art_buf)-NL_SIZE+1,1);
  2789.               savefrom = ftell(artfp);
  2790. !             uud_start(s);
  2791.               uudecode(artfp);
  2792.               break;
  2793.           }
  2794.  
  2795. --- 226,232 -----
  2796.               cnt = 0;
  2797.               fseek(artfp,(long)-strlen(art_buf)-NL_SIZE+1,1);
  2798.               savefrom = ftell(artfp);
  2799. !             uud_start(extractdest);
  2800.               uudecode(artfp);
  2801.               break;
  2802.           }
  2803. ***************
  2804. *** 380,391
  2805.           if (tmpfd == -1)
  2806.           mailbox = FALSE;
  2807.           else {
  2808. !         read(tmpfd,buf,LBUFLEN);
  2809. !         c = buf;
  2810. !         if (!isspace(MBOXCHAR))
  2811. !             while (isspace(*c))
  2812. !             c++;
  2813. !         mailbox = (*c == MBOXCHAR);
  2814.           close(tmpfd);
  2815.           }
  2816.       }
  2817.  
  2818. --- 384,398 -----
  2819.           if (tmpfd == -1)
  2820.           mailbox = FALSE;
  2821.           else {
  2822. !         if (read(tmpfd,buf,LBUFLEN)) {
  2823. !             c = buf;
  2824. !             if (!isspace(MBOXCHAR))   /* if non-zero, */
  2825. !             while (isspace(*c))   /* check the first character */
  2826. !                 c++;
  2827. !             mailbox = (*c == MBOXCHAR);
  2828. !         } else {
  2829. !             mailbox = mbox_always;    /* if zero length, recheck -M */
  2830. !         }
  2831.           close(tmpfd);
  2832.           }
  2833.       }
  2834. Index: respond.h
  2835. Prereq: 4.4
  2836. *** respond.h    Fri Dec  6 23:50:11 1991
  2837. --- ../rn4.4.2/respond.h    Sun Dec  1 12:10:38 1991
  2838. ***************
  2839. *** 1,4
  2840. ! /* $Id: respond.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  2841.    *
  2842.    * $Log: respond.h,v $
  2843.    * Revision 4.4  1991/09/09  20:27:37  sob
  2844.  
  2845. --- 1,4 -----
  2846. ! /* $Id: respond.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2847.    *
  2848.    * $Log: respond.h,v $
  2849.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2850. ***************
  2851. *** 1,6
  2852.   /* $Id: respond.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  2853.    *
  2854.    * $Log: respond.h,v $
  2855.    * Revision 4.4  1991/09/09  20:27:37  sob
  2856.    * release 4.4
  2857.    *
  2858.  
  2859. --- 1,9 -----
  2860.   /* $Id: respond.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2861.    *
  2862.    * $Log: respond.h,v $
  2863. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  2864. +  * Patchlevel 2 changes
  2865. +  *
  2866.    * Revision 4.4  1991/09/09  20:27:37  sob
  2867.    * release 4.4
  2868.    *
  2869. ***************
  2870. *** 20,25
  2871.    */
  2872.   
  2873.   EXT char *savedest INIT(Nullch);    /* value of %b */
  2874.   EXT char *extractprog INIT(Nullch);    /* value of %e */
  2875.   EXT ART_POS savefrom INIT(0);        /* value of %B */
  2876.   EXT char *headname INIT(Nullch);
  2877.  
  2878. --- 23,29 -----
  2879.    */
  2880.   
  2881.   EXT char *savedest INIT(Nullch);    /* value of %b */
  2882. + EXT char *extractdest INIT(Nullch);    /* value of %E */
  2883.   EXT char *extractprog INIT(Nullch);    /* value of %e */
  2884.   EXT ART_POS savefrom INIT(0);        /* value of %B */
  2885.   EXT char *headname INIT(Nullch);
  2886. Index: rn.1
  2887. Prereq: 4.4.1.1
  2888. *** rn.1    Fri Dec  6 23:48:56 1991
  2889. --- ../rn4.4.2/rn.1    Mon Nov 18 20:26:42 1991
  2890. ***************
  2891. *** 1,4
  2892. ! .\" $Id: rn.1,v 4.4.1.1 1991/09/25 19:36:48 sob Exp sob $
  2893.   .\" 
  2894.   .\" This software is Copyright 1991 by Stan Barber. 
  2895.   .\"
  2896.  
  2897. --- 1,4 -----
  2898. ! .\" $Id: rn.1,v 4.4 1991/11/08 16:23:39 sob Exp $
  2899.   .\" 
  2900.   .\" This software is Copyright 1991 by Stan Barber. 
  2901.   .\"
  2902. ***************
  2903. *** 31,38
  2904.   ..
  2905.   .\"
  2906.   .\"     Set up \*(-- to give an unbreakable dash;
  2907. - .\"     string Tr holds user defined translation string.
  2908. - .\"     Bell System Logo is used as a dummy character.
  2909.   .\"
  2910.   .tr \(bs-|\(bv\*(Tr
  2911.   .ie n \{\
  2912.  
  2913. --- 31,36 -----
  2914.   ..
  2915.   .\"
  2916.   .\"     Set up \*(-- to give an unbreakable dash;
  2917.   .\"
  2918.   .tr \(bs-|\(bv\*(Tr
  2919.   .ie n \{\
  2920. ***************
  2921. *** 291,297
  2922.   Escape to a subshell.
  2923.   One exclamation mark (!) leaves you in your own news directory.
  2924.   A double exclamation mark (!!) leaves you in the spool
  2925. ! directory for news, which on most systems is /usr/spool/news that don't use NNTP.
  2926.   The environment variable SHELL will be used if defined.
  2927.   If
  2928.   .I command
  2929.  
  2930. --- 289,295 -----
  2931.   Escape to a subshell.
  2932.   One exclamation mark (!) leaves you in your own news directory.
  2933.   A double exclamation mark (!!) leaves you in the spool
  2934. ! directory for news, which on most systems is /usr/spool/news if NNTP is not being used.
  2935.   The environment variable SHELL will be used if defined.
  2936.   If
  2937.   .I command
  2938. ***************
  2939. *** 426,432
  2940.   Scan forward for article containing
  2941.   .I pattern
  2942.   in the subject.
  2943. ! See the section on Regular Expressions.
  2944.   Together with the escape substitution facility described later, it becomes
  2945.   easy to search for various attributes of the current article, such as
  2946.   subject, article ID, author name, etc.
  2947.  
  2948. --- 424,430 -----
  2949.   Scan forward for article containing
  2950.   .I pattern
  2951.   in the subject.
  2952. ! See the Regular Expressions section.
  2953.   Together with the escape substitution facility described later, it becomes
  2954.   easy to search for various attributes of the current article, such as
  2955.   subject, article ID, author name, etc.
  2956. ***************
  2957. *** 1147,1156
  2958.   Current article number.
  2959.   .Ip %A 8
  2960.   Full name of current article (%P/%c/%a).
  2961. - (On a Eunice system with the LINKART option, %P/%c/%a returns the name of
  2962. - the article in the current newsgroup, while %A returns the real name of
  2963. - the article, which may be different if the current article was posted to
  2964. - multiple newsgroups.)
  2965.   .Ip %b 8
  2966.   Destination of last save command, often a mailbox.
  2967.   .Ip %B 8
  2968.  
  2969. --- 1145,1150 -----
  2970.   Current article number.
  2971.   .Ip %A 8
  2972.   Full name of current article (%P/%c/%a).
  2973.   .Ip %b 8
  2974.   Destination of last save command, often a mailbox.
  2975.   .Ip %B 8
  2976. ***************
  2977. *** 1168,1173
  2978.   \*(L"Distribution:\*(R" line from the current article.
  2979.   .Ip %e 8
  2980.   The last command executed to extract an article.
  2981.   .Ip %f 8
  2982.   \*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
  2983.   line if there is one.
  2984.  
  2985. --- 1162,1169 -----
  2986.   \*(L"Distribution:\*(R" line from the current article.
  2987.   .Ip %e 8
  2988.   The last command executed to extract an article.
  2989. + .Ip %E 8
  2990. + The last directory where an extracted file went.
  2991.   .Ip %f 8
  2992.   \*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
  2993.   line if there is one.
  2994. ***************
  2995. *** 1310,1315
  2996.   \*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
  2997.   Inserting \*(L'_\*(R' causes the first letter following the last
  2998.   \&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
  2999.   .SH ENVIRONMENT
  3000.   The following environment variables are paid attention to by
  3001.   .IR rn .
  3002.  
  3003. --- 1306,1316 -----
  3004.   \*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
  3005.   Inserting \*(L'_\*(R' causes the first letter following the last
  3006.   \&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
  3007. + .PP
  3008. + Inserting \*(L'\\\*(R' will insert a backslash before
  3009. + any characters that would be magic in a regular expression:
  3010. + \*L"%\\C\*(R" produces \*(L"net\\.jokes\*(R".
  3011. + This is called regexp quoting.
  3012.   .SH ENVIRONMENT
  3013.   The following environment variables are paid attention to by
  3014.   .IR rn .
  3015. Index: rn.c
  3016. Prereq: 4.4.1.1
  3017. *** rn.c    Fri Dec  6 23:49:26 1991
  3018. --- ../rn4.4.2/rn.c    Sun Dec  1 12:11:30 1991
  3019. ***************
  3020. *** 24,31
  3021.    * is at the user's own risk. 
  3022.    */
  3023.   
  3024. ! static char rnid[] = "@(#)$Id: rn.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $";
  3025. ! static char patchlevel[] = "Patchlevel 1";
  3026.   
  3027.   /* $Log: rn.c,v $
  3028.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  3029.  
  3030. --- 24,31 -----
  3031.    * is at the user's own risk. 
  3032.    */
  3033.   
  3034. ! static char rnid[] = "@(#)$Id: rn.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $";
  3035. ! static char patchlevel[] = "Patchlevel 2";
  3036.   
  3037.   /* $Log: rn.c,v $
  3038.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  3039. ***************
  3040. *** 28,33
  3041.   static char patchlevel[] = "Patchlevel 1";
  3042.   
  3043.   /* $Log: rn.c,v $
  3044.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  3045.    * Updated patchlevel message
  3046.    *
  3047.  
  3048. --- 28,36 -----
  3049.   static char patchlevel[] = "Patchlevel 2";
  3050.   
  3051.   /* $Log: rn.c,v $
  3052. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  3053. +  * Patchlevel 2 changes
  3054. +  *
  3055.    * Revision 4.4.1.1  1991/09/25  19:38:08  sob
  3056.    * Updated patchlevel message
  3057.    *
  3058. ***************
  3059. *** 94,100
  3060.       /* loop through all unread news */
  3061.   
  3062.       {
  3063. -     char promptbuf[80];
  3064.       bool special = FALSE;        /* temporarily allow newsgroup */
  3065.                       /*   with no unread news? */
  3066.       bool retry;            /* cycle back to top of list? */
  3067.  
  3068. --- 97,102 -----
  3069.       /* loop through all unread news */
  3070.   
  3071.       {
  3072.       bool special = FALSE;        /* temporarily allow newsgroup */
  3073.                       /*   with no unread news? */
  3074.       bool retry;            /* cycle back to top of list? */
  3075. ***************
  3076. *** 154,170
  3077.               }
  3078.   #endif
  3079.               dfltcmd = (retry ? "npq" : "qnp");
  3080. - #ifdef VERBOSE
  3081. -             IF(verbose)
  3082. -             sprintf(promptbuf,
  3083. -                 "\n******** End of newsgroups--what next? [%s] ",
  3084. -                 dfltcmd);
  3085. -             ELSE
  3086. - #endif
  3087. - #ifdef TERSE
  3088. -             sprintf(promptbuf,
  3089. -                 "\n**** End--next? [%s] ", dfltcmd);
  3090. - #endif
  3091.           }
  3092.           else {
  3093.               bool shoe_fits;    /* newsgroup matches restriction? */
  3094.  
  3095. --- 156,161 -----
  3096.               }
  3097.   #endif
  3098.               dfltcmd = (retry ? "npq" : "qnp");
  3099.           }
  3100.           else {
  3101.               bool shoe_fits;    /* newsgroup matches restriction? */
  3102. ***************
  3103. *** 189,208
  3104.               }
  3105.       reprompt_newsgroup:
  3106.               dfltcmd = "ynq";
  3107. - #ifdef VERBOSE
  3108. -             IF(verbose)
  3109. -             sprintf(promptbuf,
  3110. -                 "\n******** %3ld unread article%s in %s--read now? [%s] ",
  3111. -                 (long)toread[ng], (toread[ng]==TR_ONE ? nullstr : "s"),
  3112. -                 ngname, dfltcmd);    /* format prompt string */
  3113. -             ELSE
  3114. - #endif
  3115. - #ifdef TERSE
  3116. -             sprintf(promptbuf,
  3117. -                 "\n**** %3ld in %s--read? [%s] ",
  3118. -                 (long)toread[ng],
  3119. -                 ngname,dfltcmd);    /* format prompt string */
  3120. - #endif
  3121.           }
  3122.           special = FALSE;    /* go back to normal mode */
  3123.           if (ng != current_ng) {
  3124.  
  3125. --- 180,185 -----
  3126.               }
  3127.       reprompt_newsgroup:
  3128.               dfltcmd = "ynq";
  3129.           }
  3130.           special = FALSE;    /* go back to normal mode */
  3131.           if (ng != current_ng) {
  3132. ***************
  3133. *** 212,218
  3134.           }
  3135.       reask_newsgroup:
  3136.           unflush_output();    /* disable any ^O in effect */
  3137. !         fputs(promptbuf,stdout) FLUSH;/* print prompt */
  3138.           fflush(stdout);
  3139.       reinp_newsgroup:
  3140.           eat_typeahead();
  3141.  
  3142. --- 189,218 -----
  3143.           }
  3144.       reask_newsgroup:
  3145.           unflush_output();    /* disable any ^O in effect */
  3146. !         if (ng >= nextrcline) {
  3147. ! #ifdef VERBOSE
  3148. !             IF(verbose)
  3149. !             printf("\n******** End of newsgroups--what next? [%s] ",
  3150. !                 dfltcmd);
  3151. !             ELSE
  3152. ! #endif
  3153. ! #ifdef TERSE
  3154. !             printf("\n**** End--next? [%s] ", dfltcmd);
  3155. ! #endif
  3156. !         } else {
  3157. ! #ifdef VERBOSE
  3158. !             IF(verbose)
  3159. !             printf("\n******** %3ld unread article%s in %s--read now? [%s] ",
  3160. !                 (long)toread[ng], (toread[ng]==TR_ONE ? nullstr : "s"),
  3161. !                 ngname, dfltcmd);
  3162. !             ELSE
  3163. ! #endif
  3164. ! #ifdef TERSE
  3165. !             printf("\n**** %3ld in %s--read? [%s] ",
  3166. !                 (long)toread[ng],
  3167. !                 ngname,dfltcmd);
  3168. ! #endif
  3169. !         }
  3170.           fflush(stdout);
  3171.       reinp_newsgroup:
  3172.           eat_typeahead();
  3173. ***************
  3174. *** 245,250
  3175.               break;
  3176.           case '-':
  3177.               ng = recent_ng;    /* recall previous newsgroup */
  3178.               special = TRUE;    /* don't skip it if toread==0 */
  3179.               break;
  3180.           case 'q': case 'Q': case 'x':    /* quit? */
  3181.  
  3182. --- 245,253 -----
  3183.               break;
  3184.           case '-':
  3185.               ng = recent_ng;    /* recall previous newsgroup */
  3186. +             if (ng < nextrcline)
  3187. +             if (!get_ng(rcline[ng],FALSE))
  3188. +                 ng = current_ng;
  3189.               special = TRUE;    /* don't skip it if toread==0 */
  3190.               break;
  3191.           case 'q': case 'Q': case 'x':    /* quit? */
  3192. ***************
  3193. *** 472,478
  3194.           case '&':
  3195.               if (switcheroo()) /* get rest of command */
  3196.               goto reinp_newsgroup;    /* if rubbed out, try something else */
  3197. !             goto reask_newsgroup;
  3198.           case 'l': {        /* list other newsgroups */
  3199.               if (!finish_command(TRUE)) /* get rest of command */
  3200.               goto reinp_newsgroup;    /* if rubbed out, try something else */
  3201.  
  3202. --- 475,481 -----
  3203.           case '&':
  3204.               if (switcheroo()) /* get rest of command */
  3205.               goto reinp_newsgroup;    /* if rubbed out, try something else */
  3206. !             goto reprompt_newsgroup;
  3207.           case 'l': {        /* list other newsgroups */
  3208.               if (!finish_command(TRUE)) /* get rest of command */
  3209.               goto reinp_newsgroup;    /* if rubbed out, try something else */
  3210. *** /dev/null    Sat Dec  7 05:01:53 1991
  3211. --- ../rn4.4.2/server.h.SH    Sun Nov 10 13:33:48 1991
  3212. ***************
  3213. *** 0
  3214.  
  3215. --- 1,41 -----
  3216. + :
  3217. + case $CONFIG in
  3218. +     '') . ./config.sh ;;
  3219. + esac
  3220. + if $test $isrrn = define 
  3221. + then
  3222. + $echo "Extracting server.h (with variable substitutions)"
  3223. + $cat >server.h <<!GROK!THIS!
  3224. + /*
  3225. +  * $Id$
  3226. +  * 
  3227. +  * $Log$
  3228. +  * 
  3229. +  * 
  3230. +  * This software is Copyright 1991 by Stan Barber. 
  3231. +  * 
  3232. +  * Permission is hereby granted to copy, reproduce, redistribute or otherwise
  3233. +  * use this software as long as: there is no monetary profit gained
  3234. +  * specifically from the use or reproduction of this software, it is not
  3235. +  * sold, rented, traded or otherwise marketed, and this copyright notice is
  3236. +  * included prominently in any copy made. 
  3237. +  *
  3238. +  * The author make no claims as to the fitness or correctness of this software
  3239. +  * for any use whatsoever, and it is provided as is. Any use of this software
  3240. +  *is at the user's own risk. 
  3241. +  */
  3242. + #ifdef SERVER
  3243. + extern  char    *getserverbyfile ANSI((char *));
  3244. + extern  int     server_init ANSI((char *));
  3245. + extern  void    put_server ANSI((char *));
  3246. + extern  int     get_server ANSI((char *,int));
  3247. + extern  void    close_server ANSI((void));
  3248. + #include "$NNTPSRC/common/nntp.h"
  3249. + EXT     char ser_line[NNTP_STRLEN];
  3250. + #endif
  3251. + !GROK!THIS!
  3252. + else
  3253. +     rm -f server.h
  3254. + fi
  3255. Index: term.c
  3256. Prereq: 4.4
  3257. *** term.c    Fri Dec  6 23:49:22 1991
  3258. --- ../rn4.4.2/term.c    Sun Dec  1 12:09:50 1991
  3259. ***************
  3260. *** 1,4
  3261. ! /* $Id: term.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  3262.    *
  3263.    * $Log: term.c,v $
  3264.    * Revision 4.4  1991/09/09  20:27:37  sob
  3265.  
  3266. --- 1,4 -----
  3267. ! /* $Id: term.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  3268.    *
  3269.    * $Log: term.c,v $
  3270.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  3271. ***************
  3272. *** 1,6
  3273.   /* $Id: term.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  3274.    *
  3275.    * $Log: term.c,v $
  3276.    * Revision 4.4  1991/09/09  20:27:37  sob
  3277.    * release 4.4
  3278.    *
  3279.  
  3280. --- 1,9 -----
  3281.   /* $Id: term.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  3282.    *
  3283.    * $Log: term.c,v $
  3284. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  3285. +  * Patchlevel 2 changes
  3286. +  *
  3287.    * Revision 4.4  1991/09/09  20:27:37  sob
  3288.    * release 4.4
  3289.    *
  3290. ***************
  3291. *** 1119,1125
  3292.   void
  3293.   termlib_init()
  3294.   {
  3295. ! #ifdef HAVETERMLIB
  3296.       if (TI && *TI)
  3297.           tputs (TI,1,putchr);
  3298.   #endif
  3299.  
  3300. --- 1122,1128 -----
  3301.   void
  3302.   termlib_init()
  3303.   {
  3304. ! #ifdef USETITE
  3305.       if (TI && *TI)
  3306.           tputs (TI,1,putchr);
  3307.   #endif
  3308. ***************
  3309. *** 1128,1134
  3310.   void
  3311.   termlib_reset()
  3312.   {
  3313. ! #ifdef HAVETERMLIB
  3314.       if (TE && *TE)
  3315.           tputs (TE,1,putchr);
  3316.   #endif
  3317.  
  3318. --- 1131,1137 -----
  3319.   void
  3320.   termlib_reset()
  3321.   {
  3322. ! #ifdef USETITE
  3323.       if (TE && *TE)
  3324.           tputs (TE,1,putchr);
  3325.   #endif
  3326. Index: uudecode.c
  3327. Prereq: 4.4
  3328. *** uudecode.c    Fri Dec  6 23:49:39 1991
  3329. --- ../rn4.4.2/uudecode.c    Sun Dec  1 12:09:54 1991
  3330. ***************
  3331. *** 1,4
  3332. ! /* $Id: uudecode.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  3333.    *
  3334.    * $Log: uudecode.c,v $
  3335.    * Revision 4.4  1991/09/09  20:27:37  sob
  3336.  
  3337. --- 1,4 -----
  3338. ! /* $Id: uudecode.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  3339.    *
  3340.    * $Log: uudecode.c,v $
  3341.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  3342. ***************
  3343. *** 1,6
  3344.   /* $Id: uudecode.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
  3345.    *
  3346.    * $Log: uudecode.c,v $
  3347.    * Revision 4.4  1991/09/09  20:27:37  sob
  3348.    * release 4.4
  3349.    *
  3350.  
  3351. --- 1,9 -----
  3352.   /* $Id: uudecode.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  3353.    *
  3354.    * $Log: uudecode.c,v $
  3355. +  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  3356. +  * Patchlevel 2 changes
  3357. +  *
  3358.    * Revision 4.4  1991/09/09  20:27:37  sob
  3359.    * release 4.4
  3360.    *
  3361. ***************
  3362. *** 31,37
  3363.   #include "uudecode.h"
  3364.   
  3365.   #define MAXCHAR 256
  3366. ! #define NORMLEN 60    /* allows for 80 encoded chars per line */
  3367.   
  3368.   #define SEQMAX 'z'
  3369.   #define SEQMIN 'a'
  3370.  
  3371. --- 34,40 -----
  3372.   #include "uudecode.h"
  3373.   
  3374.   #define MAXCHAR 256
  3375. ! #define NORMLEN 64    /* allows for 84 encoded chars per line */
  3376.   
  3377.   #define SEQMAX 'z'
  3378.   #define SEQMIN 'a'
  3379. ***************
  3380. *** 127,133
  3381.               return -1;
  3382.               }
  3383.           }
  3384. !         printf("INCOMPLETE FILE: %s -- removed\n", dest);
  3385.           sleep(2);
  3386.           fclose(uu_out);
  3387.           uu_out = Nullfp;
  3388.  
  3389. --- 130,136 -----
  3390.               return -1;
  3391.               }
  3392.           }
  3393. !         uud_end();
  3394.           sleep(2);
  3395.           Xflag = FALSE;
  3396.           expecting_part = 0;
  3397. ***************
  3398. *** 129,136
  3399.           }
  3400.           printf("INCOMPLETE FILE: %s -- removed\n", dest);
  3401.           sleep(2);
  3402. -         fclose(uu_out);
  3403. -         uu_out = Nullfp;
  3404.           Xflag = FALSE;
  3405.           expecting_part = 0;
  3406.           unlink(dest);
  3407.  
  3408. --- 132,137 -----
  3409.           }
  3410.           uud_end();
  3411.           sleep(2);
  3412.           Xflag = FALSE;
  3413.           expecting_part = 0;
  3414.           }
  3415. ***************
  3416. *** 133,139
  3417.           uu_out = Nullfp;
  3418.           Xflag = FALSE;
  3419.           expecting_part = 0;
  3420. -         unlink(dest);
  3421.           }
  3422.           state = FIND_BEGIN;
  3423.           /* fall thru */
  3424.  
  3425. --- 134,139 -----
  3426.           sleep(2);
  3427.           Xflag = FALSE;
  3428.           expecting_part = 0;
  3429.           }
  3430.           state = FIND_BEGIN;
  3431.           /* fall thru */
  3432. ***************
  3433. *** 253,258
  3434.       register int blen;        /* binary length (from decoded file) */
  3435.       register int rlen;        /* calculated input line length */
  3436.       register int len;        /* actual input line length */
  3437.   
  3438.       if (Xflag) {
  3439.       if (*buff == 'X')
  3440.  
  3441. --- 253,260 -----
  3442.       register int blen;        /* binary length (from decoded file) */
  3443.       register int rlen;        /* calculated input line length */
  3444.       register int len;        /* actual input line length */
  3445. +     register int dash;        /* number of '-'s encountered on a line */
  3446. +                 /* If it's too high, we reject the line */
  3447.   
  3448.   #   define REJECT(buf,rlen,len) /* Comment for makedepend to     \
  3449.                   ** ignore the backslash above */ \
  3450. ***************
  3451. *** 254,259
  3452.       register int rlen;        /* calculated input line length */
  3453.       register int len;        /* actual input line length */
  3454.   
  3455.       if (Xflag) {
  3456.       if (*buff == 'X')
  3457.           buff++;
  3458.  
  3459. --- 256,268 -----
  3460.       register int dash;        /* number of '-'s encountered on a line */
  3461.                   /* If it's too high, we reject the line */
  3462.   
  3463. + #   define REJECT(buf,rlen,len) /* Comment for makedepend to     \
  3464. +                 ** ignore the backslash above */ \
  3465. +     ((*buf == 'M' && len > rlen + 5) \
  3466. +      || (*buf != 'M' && len != rlen && len != rlen+1) \
  3467. +      || (strnEQ(buf, "BEGIN", 5)) \
  3468. +      || (strnEQ(buf, "END", 3)))
  3469.       if (Xflag) {
  3470.       if (*buff == 'X')
  3471.           buff++;
  3472. ***************
  3473. *** 261,267
  3474.           *buff = 'x';    /* force a mis-parse of a non-x'ed line */
  3475.       }
  3476.       len = strlen(buff);
  3477. !     if (--len < 0)
  3478.       return state;
  3479.   
  3480.       buff[len] = '\0';
  3481.  
  3482. --- 270,276 -----
  3483.           *buff = 'x';    /* force a mis-parse of a non-x'ed line */
  3484.       }
  3485.       len = strlen(buff);
  3486. !     if (--len <= 0)
  3487.       return state;
  3488.   
  3489.       buff[len] = '\0';
  3490. ***************
  3491. *** 301,307
  3492.       }
  3493.   
  3494.       rlen = cdlen[blen];
  3495. !     if (state == SKIP_LEADING && len != rlen && len != rlen+1)
  3496.       return SKIP_LEADING;
  3497.   
  3498.       /*
  3499.  
  3500. --- 310,316 -----
  3501.       }
  3502.   
  3503.       rlen = cdlen[blen];
  3504. !     if (state == SKIP_LEADING && REJECT(buff,rlen,len))
  3505.       return SKIP_LEADING;
  3506.   
  3507.       /*
  3508. ***************
  3509. *** 310,316
  3510.       if (blen == 0)
  3511.       return state;
  3512.   
  3513. !     if (len > rlen + 5)
  3514.       return SKIP_TRAILING;
  3515.   
  3516.       /*
  3517.  
  3518. --- 319,325 -----
  3519.       if (blen == 0)
  3520.       return state;
  3521.   
  3522. !     if (REJECT(buff,rlen,len))
  3523.       return SKIP_TRAILING;
  3524.   
  3525.       /*
  3526. ***************
  3527. *** 322,328
  3528.       /*
  3529.        * Verify
  3530.        */
  3531. !     for (n = rlen, bp = buff; --n >= 0; bp++)
  3532.       if (trtbl[*bp] < 0) {
  3533.           if (state == SKIP_LEADING)
  3534.           return SKIP_LEADING;
  3535.  
  3536. --- 331,337 -----
  3537.       /*
  3538.        * Verify
  3539.        */
  3540. !     for (n = rlen, bp = buff, dash = 0; --n >= 0; bp++) {
  3541.       if (trtbl[*bp] < 0) {
  3542.           if (state == SKIP_LEADING)
  3543.           return SKIP_LEADING;
  3544. ***************
  3545. *** 328,333
  3546.           return SKIP_LEADING;
  3547.           return DECODE_ERROR;
  3548.       }
  3549.   
  3550.       /*
  3551.        * Check for uuencodes that append a 'z' to each line....
  3552.  
  3553. --- 337,350 -----
  3554.           return SKIP_LEADING;
  3555.           return DECODE_ERROR;
  3556.       }
  3557. +     if (*bp == '-')
  3558. +         dash++;
  3559. +     }
  3560. +     if (dash * 100 / rlen > 33)        /* more than 1/3 dashes? */
  3561. +     if (state == SKIP_LEADING)
  3562. +         return SKIP_LEADING;    /* -> reject */
  3563. +     else
  3564. +         return SKIP_TRAILING;
  3565.   
  3566.       /*
  3567.        * Check for uuencodes that append a 'z' to each line....
  3568. ***************
  3569. *** 423,429
  3570.       register int c, n = 0;
  3571.       register char *cpt;
  3572.   
  3573. !     for (c = 0; c <= MAXCHAR; c++)
  3574.       chtbl[c] = -1;
  3575.   
  3576.       for (;;) {
  3577.  
  3578. --- 440,446 -----
  3579.       register int c, n = 0;
  3580.       register char *cpt;
  3581.   
  3582. !     for (c = 0; c < MAXCHAR; c++)
  3583.       chtbl[c] = -1;
  3584.   
  3585.       for (;;) {
  3586. Index: patchlevel
  3587. Prereq: 1
  3588. *** patchlevel    Fri Dec  6 23:49:04 1991
  3589. --- ../rn4.4.2/patchlevel    Sun Dec  1 12:11:38 1991
  3590. ***************
  3591. *** 1
  3592. ! Patch:  1
  3593.  
  3594. --- 1 -----
  3595. ! Patch:  2
  3596.